Create Dropship Label
POST/api/purchase-orders/:purchase_order/dropship-labels
Requests a dropship label for the purchase order — buy it now, or schedule the purchase for the date the order will be ready to ship (the label is bought at the configured purchase time on that date in the supplier's timezone).
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body fields:
- ready (string, required):
nowordate - ship_date (string, required when ready=date, Y-m-d): today or later in the supplier's timezone, at most 90 days ahead. Ignored when ready=now.
- service_token (string, optional, max 191): pin a service from Quote Dropship Label Rates; omitted = cheapest allowed rate
Package fields (
packages, 1–10 entries, required): - packages.*.weight (number, required, > 0)
- packages.*.weight_unit (string, required): lb, oz, kg, g
- packages.*.length / width / height (number, required, > 0)
- packages.*.dimension_unit (string, required): in, cm
- partial (boolean, optional):
true= ship only the items inlines;false= ignorelinesand label the whole order - lines (array, optional; required when partial=true): ship only part of the order. Omit for every open line. Rows with a quantity of 0 are dropped; when
linesis sent (or partial=true) at least one row must have a positive quantity, otherwise 422 "Select at least one item to ship." - lines.*.purchase_order_line_id (integer, required): must belong to this purchase order
- lines.*.quantity (number, required, >= 0; 0 = not in this shipment)
Idempotent: when the purchase order already has an open full-order label, that label is returned with 200 instead of creating another. A new label returns 201.
Domain failures return 422 with {message, reason} where reason is one of: no_provider (no label-capable shipping integration is assigned to the supplier or set as the default), not_eligible (the purchase order cannot get a label — e.g. not a dropship order, closed, or the supplier uses their own labels), purchase_failed (the carrier/provider refused the purchase), already_in_progress, relabel_limit_reached, invalid_state (the label's status does not allow the action) or provider_unavailable (the shipping provider could not be reached).
Label objects include label_file_count (number of downloadable label files, one per package; 0 until purchased) — pass a zero-based index below it as package to Download Dropship Label. portal_url (on each label and at the top level) is returned only to users with the purchase_orders.update permission — and, when calling with a Personal Access Token, only if the token has the purchase-orders:write scope; otherwise it is null. The link carries the supplier's share token, which lets its holder buy, re-label and void labels.
Authentication: Requires Bearer token.
Requires permission: purchase_orders.update
Request
Responses
- 201
- 401
- 403
- 404
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.