Endpoint: https://api.omnisend.com/v3/batches
Batch operations are used to make multiple one-type operations with one request.
Currently supported:
- POST batch operations for contacts, products, orders, events (only triggered by `eventID``), categories
- PUT batch operations for products, and orders (don't forget to add
productIDororderIDin eachitemarray object)
Operations limit in one batch - 1000.
Batch statuses
| Status | Description |
|---|---|
| pending | Batch is received but not started |
| inProgress | Batch is in progress |
| finished | All batch operations are finished |
| stopped | Batch stopped for too many errors |
Parameters
| Parameter | Type | Description |
|---|---|---|
| method | string | Supported methods: POST |
| endpoint | string | Endpoint: contacts, orders, products, events |
| eventID | string | EventID is required and used only with endpoint events |
| batchID | string | Batch ID. You can use this ID for checking batch status and errors. |
| status | string | Batch status |
| createdAt | string (format: date-time) | Batch creation date-time. ISO 8601 format. Example: 2017-05-30T15:14:22Z |
| startedAt | string (format:date-time) | Batch operations start time. ISO 8601 format. Example: 2017-05-30T15:14:22Z |
| endedAt | string (format:date-time) | Batch operations finish time. ISO 8601 format. Example: 2017-05-30T15:14:22Z |
| totalCount | integer | Items in batch count |
| finishedCount | integer | Processed items in batch count |
| errorsCount | integer | Items with errors in batch count |
| errors | array | Error array |
| responses | array | Responses of successfully finished operations |
| response | array | Result of operation (Json format) |
| responseCode | integer | Response code |
| items | array | Parameters array. Use same parameters as using in defined method. |
| items.itemID | string | Batch each item's ID. You can use it to check specific batch item response or status. |
| request | array | Request array (Json format) |
| items.status | string | Can be: pending, finished |