Skip to content

Product image BATCH insert

Request

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.

Security
shoptetAccessToken or shoptetPrivateApiToken
Query
clearImagesboolean

Remove all original images in products gallery before processing new ones

Default:false
Example:clearImages=true
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
batchFileUrlPathstringrequired

Url to batch file with products data. File must be in JSONL format.

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-products-update.jsonl"
  }'

Responses

Accepted

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
Response
{ "data": { "jobId": "ad24xod" }, "errors": [ { … } ] }