Upload product images
If you use the Product Library API to manage products, you can use the Zettle Image service to manage product images.
All images have to be uploaded or imported into Zettle first through the Image API. Images can either be imported from
existing URLs, or uploaded as image files.
After uploading, the Image API returns a URL and a lookup key. These are used to fetch the image and add it to a product
through the Product Library API.
- Authorisation setup with a valid authorisation token and the access scope
READ:PRODUCT
.
The following request uploads an image file to the Zettle image service. Since the request sends a file, the
content-type is
multipart/form-data
, instead of the usual application/json
.The response returns the URL and the
imageLookupKey
for the uploaded image.Example response:
This request uploads an image using a URL. The response returns the Zettle
imageUrl
and imageLookupKey
for the
uploaded image.Example: This request uploads an image in PNG format with the URL
https://some-image-source.com/id/300/320/240.png
.Example response:
You can upload multiple images in one request. To upload, define a list of objects and specify each image
with
imageFormat
and the imageUrl
. The response returns the Zettle imageUrl
and imageLookupKey
for the uploaded
images.Example: This request uploads two images in PNG format with the
URLs
https://some-image-source.com/id/300/320/240.png
and https://some-image-source.com/id/300/320/241.png
.Example response: The response shows a successful upload with the generated lookup key and URLs for each image.