Beta/Experimental feature: This endpoint is currently in beta and may exhibit unexpected behavior.
This endpoint allows you to create multiple orders at once. Batch insertion is processed asynchronously in the same way as, for example, List of all orders, but it does not have resultUrl in the response. Instead, you can check the attribute log which contains successfully created orders and errors.
See how Asynchronous requests work on our developer's portal.
File with data for insert must be in JSONL (jsonlines) format. Each line must contain one order in JSON format. Maximum size of file is 100MB. The base structure of a JSON row contains 2 main parameters settings and data.
The settings parameter:
In the settings parameter, you can set the suppress parameters for a specific row/record.
All params in settings can be in 3 states:
true- true value is applied.false- false value is applied.parameter is missing - the default value false is applied.
The data parameter:
Structure of the data parameter is the same as the structure of JSON for single Order insertion endpoint. See Order batch create schema for more details.
The asynchronous job processes the JSONL file row by row and tries to validate and save the data. If there is any error, the row is skipped and the error is logged, but it does not stop the processing of other rows. In the log, every order is identified by its position in the file (starting from 1).
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/batch
- https://api.myshoptet.comhttps://api.myshoptet.com/api/orders/batch
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X POST \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/batch \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"batchFileUrlPath": "https://cdn.myshoptet.com/batch-products-update.jsonl"
}'{ "data": { "jobId": "ad24xod" }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }