This endpoint allows you to insert multiple product images to multiple product/galleries at once. Batch is processed asynchronously.
See how Asynchronous requests work on our developer's portal.
File with data must be in JSONL (jsonlines) format. Each line must contain one item in JSON format. Maximum size of file is 100MB.
Asynchronous job processes the jsonl file row by row and tries to validate and insert each item. If there is any error (e.g. unknown product or gallery), the row is skipped and the error is logged, but processing of other rows continues.
In Log, every item is identified by its position in file (starting from 1).
See Product image batch insert for more details.
Synchronize the product gallery with the item instead of appending to it. Images of the gallery that are not listed in the item are removed. An image already stored under the same sourceUrl keeps its id; it is downloaded again and its file is replaced only when the content changed or when the stored file is missing or empty. A failed download keeps the stored image and is reported as an item error. New images are added. When not a single listed image could be stored or matched to a stored one, nothing is removed, so a failing source cannot empty the gallery. Without this parameter nothing is removed and a sourceUrl that is already stored in the gallery is rejected as already uploaded.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/products/images/batch
- https://api.myshoptet.comhttps://api.myshoptet.com/api/products/images/batch
curl -i -X POST \
'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/products/images/batch?clearImages=true' \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"batchFileUrlPath": "https://cdn.myshoptet.com/batch-data.jsonl"
}'{ "data": { "jobId": "ad24xod" }, "errors": [ { … } ] }