Retrieve a batch
Changed onReturns a batch using an object ID.
Batch shipments are displayed 100 at a time. You can iterate through each page using the ?page= query parameter. You can also filter based on batch shipment status, for example, by passing a query param like ?object_results=creation_failed.
For more details on filtering results, see our guide on filtering.
Request
- Base URLhttps://api.goshippo.com
- URLhttps://api.goshippo.com/batches/{BatchId}
- AuthAPI key in header Authorization
Path parameters
Object ID of the batch
Query parameters
The page number you want to select
The number of results to return per page (max 100, default 5)
Headers
Optional string used to pick a non-default API version to use. See our API version guide.
Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the Platform accounts guide.
Response
Batch
Example response
{
"default_carrier_account": "078870331023437cb917f5187429b093",
"default_servicelevel_token": "usps_priority",
"label_filetype": "PDF_4x6",
"metadata": "BATCH #1",
"batch_shipments": {
"next": "baseurl?page=3&results=10",
"previous": "baseurl?page=1&results=10",
"results": [
{
"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3",
"metadata": "SHIPMENT #1",
"servicelevel_token": "fedex_ground",
"object_id": "e11c95a6788d4ddcaa22f03175838740",
"shipment": "adcfdddf8ec64b84ad22772bce3ea37a",
"status": "INVALID",
"transaction": "4c33736a67e2450da88b38c42deef6b7"
}
]
},
"object_created": "2016-01-04T00:15:44.394Z",
"object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4",
"object_owner": "shippo@shippo.com",
"object_results": {
"creation_failed": 3,
"creation_succeeded": 5
},
"object_updated": "2016-01-04T00:48:13.841Z",
"status": "VALID"
}Changes
- info
added the new optional
headerrequest parameterSHIPPO-ACCOUNT-ID
- info
- breaking
for the
headerrequest parameterSHIPPO-API-VERSION, default value2018-02-08was added
- breaking