Get Batch

Use this endpoint to get the details of a batch including all associated quotes.

REST Endpoint

GET /restapi/v1/customers/:customerId/batch/:batchId

Request Example

GET /restapi/v1/customers/TEST00002/batch/42

Response Status Code

200 OK

Response Content Type

application/json

Response JSON Example

{
  "batchId": 42,
  "name": "April Shipments",
  "status": "completed",
  "quoteCount": 3,
  "bookedCount": 2,
  "errorCount": 1,
  "createdAt": "2026-04-01 10:00:00",
  "updatedAt": "2026-04-01 11:30:00",
  "processedAt": "2026-04-01 11:30:00",
  "quotes": [
    {
      "quoteId": 1234,
      "carrierCode": "ups",
      "serviceCode": "ups_ground",
      "packageTypeCode": "ups_custom_package",
      "totalAmount": "16.27",
      "currency": "USD",
      "status": "booked",
      "bookNumber": "2456789",
      "trackingNumber": "1Z999AA10123456784",
      "bookingError": null,
      "createdAt": "2026-04-01 09:30:00",
      "expiresAt": "2026-05-01 09:30:00"
    },
    {
      "quoteId": 1235,
      "carrierCode": "usps",
      "serviceCode": "usps_priority",
      "packageTypeCode": "usps_custom_package",
      "totalAmount": "8.50",
      "currency": "USD",
      "status": "booked",
      "bookNumber": "2456790",
      "trackingNumber": "9400111899223100001234",
      "bookingError": null,
      "createdAt": "2026-04-01 09:31:00",
      "expiresAt": "2026-05-01 09:31:00"
    },
    {
      "quoteId": 1236,
      "carrierCode": "fedex",
      "serviceCode": "fedex_ground",
      "packageTypeCode": "fedex_custom_package",
      "totalAmount": "14.00",
      "currency": "USD",
      "status": "active",
      "bookNumber": null,
      "trackingNumber": null,
      "bookingError": "Insufficient prepay balance",
      "createdAt": "2026-04-01 09:32:00",
      "expiresAt": "2026-05-01 09:32:00"
    }
  ]
}

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, null if not yet processed
quotes array Array of quote detail objects
quotes[n].quoteId integer The quote ID
quotes[n].carrierCode string Carrier code
quotes[n].serviceCode string Service code
quotes[n].packageTypeCode string Package type code
quotes[n].totalAmount decimal Quoted total amount
quotes[n].currency string Currency code
quotes[n].status string Quote status: "active", "booked", or "expired"
quotes[n].bookNumber string or null Book number if the quote was booked, null otherwise
quotes[n].trackingNumber string or null Tracking number if the quote was booked, null otherwise
quotes[n].bookingError string or null Error message if booking failed, null otherwise
quotes[n].createdAt string Timestamp when the quote was created
quotes[n].expiresAt string Timestamp when the quote expires