Skip to main content
POST
cURL

Authorizations

Authorization
string
header
default:ShippoToken
required

API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123

Headers

SHIPPO-API-VERSION
string
default:2018-02-08

Optional string used to pick a non-default API version to use. See our API version guide.

Example:

"2018-02-08"

SHIPPO-ACCOUNT-ID
string

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.

Path Parameters

BatchId
string
required

Object ID of the batch

Body

application/json

Array of shipments to add to the batch

shipment
object
required
carrier_account
string

Object ID of the carrier account to be used for this shipment (will override batch default)

Example:

"a4391cd4ab974f478f55dc08b5c8e3b3"

metadata
string

A string of up to 100 characters that can be filled with any additional information you want to attach to the object.

Maximum string length: 100
Example:

"SHIPMENT #1"

servicelevel_token
string

A token that sets the shipping method for the batch, overriding the batch default. Servicelevel tokens can be found in this list or at this endpoint.

Example:

"fedex_ground"

Response

Batch

default_carrier_account
string
required

ID of the Carrier Account object to use as the default for all shipments in this Batch. The carrier account can be changed on a per-shipment basis by changing the carrier_account in the corresponding BatchShipment object.

Example:

"078870331023437cb917f5187429b093"

default_servicelevel_token
string
required

Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the corresponding BatchShipment object. Servicelevel tokens can be found here.

Example:

"usps_priority"

batch_shipments
object
required

Array of BatchShipment objects. The response keeps the same order as in the request array.

label_url
string[]
required

An array of URLs each pointing to a merged file of 100 labels each

object_created
string
required

Date and time of Batch creation

Example:

"2016-01-04T00:15:44.394Z"

object_id
string
required

Unique identifier of the given Batch object

Example:

"5ef63c54f5bf45d3b1f8fb37dcb1c5f4"

object_owner
string
required

Username of the user who created the Batch object.

Example:

"shippo@shippo.com"

object_results
object
required

An object containing the following counts: creation_succeeded, creation_failed, purchase_succeeded, purchase_failed

object_updated
string
required

Date and time of last update to the Batch

Example:

"2016-01-04T00:48:13.841Z"

status
enum<string>
required
  • VALIDATING: the batch is being created and validated
  • VALID: the batch can be purchased
  • INVALID: the batch cannot be purchased; INVALID BatchShipments must be removed
  • PURCHASING: the batch is being purchased
  • PURCHASED: the batch is finished purchasing
Available options:
VALIDATING,
VALID,
INVALID,
PURCHASING,
PURCHASED
Example:

"VALID"

label_filetype
enum<string>

Print format of the label. If empty, will use the default format set from the Shippo dashboard.

Available options:
PNG,
PNG_2.3x7.5,
PDF,
PDF_2.3x7.5,
PDF_4x6,
PDF_4x8,
PDF_A4,
PDF_A5,
PDF_A6,
ZPLII
Example:

"PDF_4x6"

metadata
string

A string of up to 100 characters that can be filled with any additional information you want to attach to the object.

Maximum string length: 100
Example:

"BATCH #1"

test
boolean
Example:

false