This endpoint allows you to delete multiple product images at once. Batch delete 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.
Each JSON row must contain productGuid and gallery (shop or shop360). Optionally it may contain imageName (the image file name). When imageName is provided, only that image is deleted. When imageName is omitted, all images of the product in the given gallery are deleted.
The request body may contain a removeReference flag (default false) that applies to the whole batch. When true, images referenced by product variants are deleted and the variant reference is cleared automatically. When false, a referenced single image is refused (the row is logged as an error), and referenced images are skipped when deleting all images of a gallery.
Asynchronous job processes the jsonl file row by row and tries to validate and delete each item. If there is any error (e.g. unknown product or image), 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).
Url to batch file with product images data. File must be in JSONL format.
When true, images referenced by product variants are deleted and the variant reference is cleared automatically. When false (default), a referenced single image is refused (the row is logged as an error), and referenced images are skipped when deleting all images of a gallery.
- 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
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X DELETE \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/products/images/batch \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"batchFileUrlPath": "https://cdn.myshoptet.com/batch-product-images-delete.jsonl",
"removeReference": false
}'{ "data": { "jobId": "ad24xod" }, "errors": [ { … } ] }