Create new batch request

You will need to send the URL, method and optional request body to Ecwid. The https://app.ecwid.com/api/v3/{STORE_ID}/ part of the request URL will be added automatically.

📘

Batch request limit

Max amount of API requests for one batch request is 500.

In response, Ecwid will start executing your requests and provide you with a unique ticket ID for your batch request. Use that ticket ID to check the status of your batch request.

You can use stopOnFirstFailure as a request parameter. If true, Ecwid will stop executing requests when it detects first error response for an API request. Set false to continue executing requests anyway. Default is true. Learn more

There's a way to make Batch requests faster with the allowParallelMode request parameter. If true, all requests (with a maximum of 100) will be performed at the same time.

Uploading product files or images

You can use batch API to upload files or images. However, they must be provided as a URL in the externalUrl parameter. Sending binary data in request body is not supported.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Query parameters

FieldTypeDescription
deduplicationKeyUUID stringUUID value that can be used to assign an ID to a ticket. If there's a consecutive create request with the same deduplicationKey, then the result for the first one will be retrieved. The result for this batch request is memorized for one hour.
groupIdstringAssigns a value to a batch request (used for the "Cancel batch group" endpoint)

Request body

An array of JSON objects of type 'BatchRequest' with the following fields:

BatchRequest

FieldTypeDescription
idstringSet an optional request ID so you can find a specific request easier in the response
pathstringPath to Ecwid REST API endpoint. Example: /orders?offset=100&[email protected]&paymentStatus=PAID,AWAITING_PAYMENT. It is not necessary to provide access token in this field. List of all API endpoints
methodstringHTTP method you would like to use. Available methods: "GET", "POST", "PUT", "DELETE"
bodystringOptional request body for your requests. Required when creating new entities or updating them. For example: send new order details when creating orders, new product details when creating products and so on

Response

A JSON object of type 'UpdateStatus' with the following fields:

UpdateStatus

FieldTypeDescription
ticketstringTicket ID for your batch request. Use it to Get batch request status

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescription
400Request parameters are invalid
415Unsupported content-type: expected application/json or text/json
500Cannot update the order info because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language