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 and body returns the original result instead of creating a duplicate. The same key with a different body is a 409.

Required string length: 1 - 255

Body

application/json

The body for POST /automations/labels: the Shippo create-shipment body plus dry_run and an optional shipment_date. Other shipment fields pass through unchanged. shipment_date is stored as sent and resolved to one UTC timestamp before rating. For the full shipment 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.

shipment_date
string | null

When the package ships. RFC 3339 (2026-09-14T13:30:00Z, seconds optional) or the same timestamp with a space instead of T. A value with no timezone is UTC. A value with an offset is converted to UTC. A date alone is rejected. A time more than 24 hours ago, or more than 365 days ahead, is rejected. Omitted, or at or before rating, resolves to the current time in UTC. A future time within 365 days is kept. The original string is stored; rating receives the resolved UTC timestamp.

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 and body returns the original request's pointer, with status showing that request's current outcome; the same key with a different body is a 409.

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