Skip to main content
POST
Create a shipment

Authorizations

Authorization
string
header
required

Your API key, sent as a bearer token. Keep it on your server. See Authentication. A request from a location we refuse gets a 403 with Access denied, whether or not it has a valid key: where you can call from.

Headers

Idempotency-Key
string
required

Your id for this shipment, 8–128 characters of A-Za-z0-9_-, unique per account among your shipments. Pack and card order ids are a separate set.

Pattern: ^[A-Za-z0-9_-]{8,128}$

Body

application/json
card_ids
string<uuid>[]
required

Card ids from Get vault, cards you hold in the vault. A listed card has to be delisted first.

Required array length: 1 - 10 elements
address
object
required

Your customer's address. Stored only with a shipment, never in logs or on your account.

rate
object
required

The rate you chose from Estimate a shipment.

max_cost
number
required

The most you'll pay for this shipment, in dollars, with any insurance. Normally the amount from the estimate, or its total if you chose insurance.

Required range: x <= 10000
cover_amount
number

Optional insurance: the dollars of cover, with at most two decimals, from $100 up to max_cover from the estimate. Leave it out and the only cover is what the carrier includes automatically: up to $100 on USPS and UPS labels. Other carriers may include less or none. You carry any loss above your cover.

Required range: 100 <= x <= 10000

Response

The shipment. A new one is processing. A retry of one that went through returns it as it stands now, with idempotent_replay: true.

A shipment as a webhook sends it. It has nothing from the customer's address.

id
string
required

The shipment's id. Get a shipment takes it.

status
enum<string>
required
  • pending: the shipment hasn't reached an order yet.
  • needs_review: we couldn't confirm the charge, and it's with our team.
  • processing: the order is queued for fulfillment.
  • shipped, delivered: the carrier has it, or has delivered it.
  • cancelled: the order was cancelled or resolved outside shipping.
Available options:
pending,
needs_review,
processing,
shipped,
delivered,
cancelled
card_ids
string[]
required
carrier
string | null
required

null until we've confirmed a rate.

service
string | null
required
service_token
string | null
required
cost
number | null
required

What the shipment charges in USD, including any insurance premium. null until we've confirmed a rate.

cover_amount
number | null
required

The insurance on this shipment, in USD. null without insurance, and before the order exists.

insurance_cost
number | null
required

The premium in USD, which is part of cost. 0 without insurance, and null before the order exists.

tracking_number
string | null
required

null until there's a label.

tracking_url
string | null
required
created_at
string
required
status_updated_at
string | null
required

When the order's status last changed.

shipped_at
string | null
required
expected_delivery
string | null
required
delivered_at
string | null
required
destination_country
string
required
needs_review
boolean

Present and true while status is needs_review.

address_removed
boolean

Present and true once we've removed the address.

idempotent_replay
boolean