Get Carton Labels PDFs
POST/api/spscommerce/fulfillments/:salesOrderFulfillment/packing/labels/document
Get the shipment's carton labels as PDF documents, kept with the shipment. Stored PDFs are reused while the cartons, addresses and freight details they print are unchanged; otherwise SPS Commerce renders them again and the new PDFs replace the old ones. Reopening packing deletes them, because the cartons' SSCC numbers are void.
integrations:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
The response is the shipment packing state. Its label_documents array holds one entry per PDF (one per 200 cartons): the stored document (open it with Stream Document File), which page carries each carton's label (cartons[].pages, matched by SSCC), whether the page count matched the cartons (pages_match), whether it is still current (is_current), and share_url — a signed link (null unless the caller may read the shipment's documents: the orders:read scope and the sales order view permission) that serves the shipment's current labels PDF without signing in, for a 3PL. The link names the shipment, not the file, so it keeps working after a re-render and returns 404 once packing is reopened. short_url is the same link in a short form (https://{tenant}.sku.io/l/{token}) that fits one line of a printed pick ticket; it is bound to the tenant, never expires and is revoked the same way.
Authentication: Requires Bearer token. Available for shipments of SPS Commerce EDI orders; other shipments return 404. Requires the sales_orders.update permission. Returns 422 when packing is not finalized or the trading partner has no label template, 502 when SPS Commerce cannot render the labels, and 409 while another request is rendering the same labels.
Shipments made by a receive-only 3PL: the cartons and labels of a shipment a receive-only 3PL made come from its ship notice, so this returns 422 with a message naming the warehouse. Reading the packing and downloading its labels still work.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.