Create Batch

Use this endpoint to create a named batch. A batch is a collection of saved quotes that can be booked together using the Batch Book endpoint. Optionally, you can include initial quote IDs when creating the batch.

REST Endpoint

POST /restapi/v1/customers/:customerId/batch

Request Content Type

application/json

Request JSON Example

POST /restapi/v1/customers/TEST00002/batch
{
  "name": "April Shipments",
  "quoteIds": [
    1234,
    1235
  ]
}

Explanation of Request Fields

Field JSON Type Required Description
name string true Customer-provided name for the batch. Maximum 255 characters.
quoteIds array false Optional array of quote IDs (integers) to add to the batch on creation. Maximum 500. Each quote must be active, belong to this customer, and not already assigned to another batch.

Response Status Code

201 Created

Response Content Type

application/json

Response JSON Example

{
  "batchId": 42,
  "name": "April Shipments",
  "status": "open",
  "quoteCount": 2,
  "bookedCount": 0,
  "errorCount": 0,
  "createdAt": "2026-04-02 14:30:00",
  "updatedAt": "2026-04-02 14:30:00",
  "processedAt": null
}

Explanation of Response Fields

Field Type Description
batchId integer System-generated batch ID
name string Customer-provided batch name
status string Batch status: "open", "processing", "completed", "failed", or "cancelled"
quoteCount integer Number of quotes in the batch
bookedCount integer Number of successfully booked quotes
errorCount integer Number of quotes that failed during booking
createdAt string Timestamp when the batch was created
updatedAt string Timestamp when the batch was last updated
processedAt string or null Timestamp when the batch was processed (booked), null if not yet processed