Purchase a batch
Changed onPurchases an existing batch with a status of VALID. Once you send a POST request to the purchase endpoint the batch status will change to PURCHASING. When all the shipments are purchased, the status will change to PURCHASED and you will receive a batch_purchased webhook indicating that the batch has been purchased
Request
- Base URLhttps://api.goshippo.com
- URLhttps://api.goshippo.com/batches/{BatchId}/purchase
- AuthAPI key in header Authorization
Path parameters
Object ID of the batch
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