Skip to main content

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.

Required scope: integrations:write

Grant 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​

OK

Response Headers
    Content-Type