Skip to main content
POST

Authorizations

Authorization
string
header
default:ShippoToken
required

Shippo API token, sent as Authorization: ShippoToken <API_TOKEN>.

Headers

Idempotency-Key
string
required

Required. A client-generated key that makes retries safe: repeating a request with the same key returns the original result instead of creating a duplicate.

Required string length: 1 - 255

Body

application/json

The body for POST /automations/labels: the Shippo create-shipment body plus dry_run. Any field that endpoint accepts is passed through unchanged, so the shipment Shippo rates and buys is exactly the one you sent. Only the address and parcel fields are described here; for the full field list, see Create a new shipment.

address_from
required

An inline Shippo address. The fields every shippable address needs are required; state and zip are optional because only some countries require them. To reuse an address you already created, pass its object_id string instead. Any other valid Shippo address field (for example company, phone, email, validate) is accepted and passed through unchanged.

address_to
required

An inline Shippo address. The fields every shippable address needs are required; state and zip are optional because only some countries require them. To reuse an address you already created, pass its object_id string instead. Any other valid Shippo address field (for example company, phone, email, validate) is accepted and passed through unchanged.

parcels
required

An inline Shippo parcel. Give its dimensions one of two ways: length, width, height, and distance_unit, or a carrier package template that supplies them. weight and mass_unit are always required, because a template sets the box size but not the weight of its contents. To reuse a parcel you already created, pass its object_id string instead. Any other valid Shippo parcel field (for example metadata, extra) is accepted and passed through unchanged.

dry_run
boolean
default:false

When true, evaluate rules and select a rate but do NOT purchase a label. Requires a genuine JSON boolean (no coercion).

Response

Successful Response

Returned by POST /automations/labels: a pointer to the accepted request. Repeating a live request with the same Idempotency-Key returns the original request's pointer, with status showing that request's current outcome.

request_id
string<uuid>
required
status
enum<string>
required

Current status of the request.

Available options:
processing,
purchased,
dry_run_completed,
no_match,
failed
poll_url
string
required