Buy a label using your automation rules
Purchases a shipping label. This spends money. A successful request charges your Shippo account for the selected rate; it cannot be undone through this API (refunds go through the Refunds API).
Send dry_run: true to see which rate the rules would select, with no purchase and no charge. Automated callers should dry-run an unfamiliar shipment shape before running it live.
The request body is the standard Shippo POST /shipments create body, plus dry_run and an optional shipment_date; other shipment fields pass through unchanged. Each request takes exactly one parcel.
Responds 202 with a request_id and a poll_url. Work continues asynchronously — poll GET /automations/labels/{request_id} until status reaches a terminal state (purchased, dry_run_completed, no_match, or failed).
The Idempotency-Key header is required. Repeating a live request with the same key and the same body returns a pointer to the original request instead of creating a duplicate. Reusing a key with a different body is rejected with 409; the original request is left untouched. Dry runs are never deduplicated (each dry_run request starts a new evaluation).
Authorizations
Headers
Body
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.
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.
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.
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.
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.
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.