Edit

Share via


Get picture

Retrieve the properties and relationships of a picture object for Business Central.

HTTP request

Replace the URL prefix for Business Central depending on environment following the guidelines.

GET businesscentralPrefix/companies({companyId})/items({itemId})/picture
GET businesscentralPrefix/companies({companyId})/employees({employeeId})/picture
GET businesscentralPrefix/companies({companyId})/vendors({vendorId})/picture
GET businesscentralPrefix/companies({companyId})/customers({customerId})/picture
GET businesscentralPrefix/companies({companyId})/contacts({contactId})/picture

Request headers

Header Value
Authorization Bearer {token}. Required.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a picture object in the response body.

Example

Request

Here's an example of the request.

GET https://{businesscentralPrefix}/api/v2.0/companies(companyId)/items(itemId)/picture

Response

Here's an example of the response.

Note

The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
    "id": "53049aad-bde4-ea11-bbf2-00155df3a615",
    "parentType": "Item", 
    "width": 400,
    "height": 400,
    "contentType": "image/jpeg",
    "[email protected]": "http://bcserver:7048/BC/api/v2.0/companies(52e03390-bde4-ea11-bbf2-00155df3a615)/customers(53049aad-bde4-ea11-bbf2-00155df3a615)/picture(3ba68d90-3a48-ed11-bbb0-000d3a398903)/content",
    "[email protected]": "http://bcserver:7048/BC/api/v2.0/companies(52e03390-bde4-ea11-bbf2-00155df3a615)/customers(53049aad-bde4-ea11-bbf2-00155df3a615)/picture(3ba68d90-3a48-ed11-bbb0-000d3a398903)/content"
}

Request

GET https://{businesscentralPrefix}/api/v2.0/companies(companyId)/items(itemId)/picture(3ba68d90-3a48-ed11-bbb0-000d3a398903)/content

Response

Body is the raw image data.

Tips for working with the APIs
picture
Delete picture
Update picture