Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates the picture of the item in Business Central.
HTTP request
Replace the URL prefix for Business Central depending on environment following the guideline.
POST businesscentralPrefix/companies({companyId})/items({itemId})/picture
Request headers (v1.0)
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. |
| Content-Type | application/json |
Request body (v1.0)
In the request body, supply a JSON representation of items object.
Response (v1.0)
If successful, this method returns 201 Created response code and a item object in the response body.
Example (v1.0)
Request
Here is an example of a request.
Note
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
POST https://{businesscentralPrefix}/api/v1.0/companies({companyId})/items({itemId})/picture
Request body
{
"parentId":"b3fbe87a-61b8-4a6c-85de-0555f1627a67",
"dimensionId":"d5fc81ea-8687-4e9d-9c49-7fde28ccdb1a",
"dimensionValueId":"1045a902-070a-4d31-b2b1-b9431e9e5b26",
"postingValidation":"Same Code"
}
Response
{
"id": "d0e5d5da-795a-4924-b376-13665f794cdd",
"width": 500,
"height": 496,
"contentType": "image\jpeg",
"content@odata.mediaEditLink": "https:\\api.businesscentral.dynamics-tie.com\v1.0\api\beta\companies(55c438d0-2f5c-44a0-9965-20b4923d0bef)\items(d0e5d5da-795a-4924-b376-13665f794cdd)\picture(d0e5d5da-795a-4924-b376-13665f794cdd)\content",
"content@odata.mediaReadLink": "https:\\api.businesscentral.dynamics-tie.com\v1.0\api\beta\companies(55c438d0-2f5c-44a0-9965-20b4923d0bef)\items(d0e5d5da-795a-4924-b376-13665f794cdd)\picture(d0e5d5da-795a-4924-b376-13665f794cdd)\content"
}
Related information
Tips for working with the APIs
Item
Get item defaultDimensions
Update item defaultDimensions
Delete item defaultDimensions