You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Images API
print icon
Images API
 

There are two methods available for images and imageitems :

  1. Get a single image
  2. Add or update an image
Get a single image

End Point: https://api.myposconnect.com/api/v2/imageitems/{ImageItemId}

Verb: GET

Example Call: https://api.myposconnect.com/api/v2/imageitems/8bf03185-cfe5-45d8-a2d9-4f83f3aa78ea

Return Codes: 200 for success, with the body containing the JSON for the ImageItem. 404 if not found. For other possible (more general) return codes please see API Build Basics

Important: Replace the “{ImageItemId}” marker in the given endpoint URL with the Id of the ImageItem item you require.

Add or update an image

End Point: https://api.myposconnect.com/api/v2/imageitems

Verb: POST

Return Codes: 202 (Accepted) for success and the body will contain the GUID of your newly added image which can then be used to assign to an object (nb please remove any json notation such as quotes or brackets from around the ID). 400 (BadRequest) for failure, see the body for more details. For other possible (more general) return codes please see API Build Basics

Important: Post a valid JSON object as shown in the appendices of this document below. You only need supply the bytes, filename, and mimeType fields. 

Example JSON Object
Add Image

{
       "bytes": JRU5ErkJggg............etc etc",
       "id": "0b36ed39-e50e-4578-a553-53e9ecf587d9",
       "imageType": "ProductMainImage",
       "filename": "Accessory.png",
       "mimeType": "image/png"
}

Troubleshooting Ideas

As with all API connections, you will need to have acquired a bearer token and the user that acquired the token will need to be assigned access permission to this table. If you are not receiving any results send the full endpoint together with any filters and the API user to us from a valid email address and we can advise if permissions have been authorised. You might be able to see data with one table and not another if specific permissions are not applied. 

 

Feedback
0 out of 0 found this helpful

scroll to top icon