Skip to main content
POST
/
v1
/
batches
Create
curl --request POST \
  --url https://{defaultHost}/v1/batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "batch": {
    "batch_operations": [
      {
        "http_method": "GET",
        "path": "/v1/products"
      },
      {
        "http_method": "POST",
        "path": "/v1/products",
        "body": {
          "product": {
            "name": "Test"
          }
        }
      }
    ]
  }
}
'
{
  "id": "ff968ff2-4b72-4d59-9d36-9b25c4c0a985",
  "object": "batch",
  "finished_batch_operations_count": 0,
  "batch_operations_count": 2,
  "status": "in_progress",
  "created_at": 1776176512,
  "updated_at": 1776176512
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
batch
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

finished_batch_operations_count
integer

The number of operations that have finished processing (completed, failed, or timed out).

batch_operations_count
integer

The total number of operations in this batch.

status
string

The status of the batch. Possible values include:

  • completed: All operations in the batch have finished processing.
  • in_progress: The batch operations are currently being executed.
  • pending: The batch has been created but processing has not yet started.
batch_operations

Expandable – Property not returned unless expanded.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.