Skip to main content

Retrieve label documents

After creating shipping labels, use GET /labels/{id} to retrieve printable airway bill documents. Pass a single identifier or comma-separated identifiers for batch retrieval. This guide covers the retrieval flow, batch requests, document formats, and practical considerations.

Retrieve the document URL

Use the id from the label creation response. {id} accepts either the label UUID or the customerOrderNumber you supplied when creating the label:

Response

200 OK

Download and print

Download the document from the returned url:

Document behavior

  • Time-limited URL — The url is a short-lived download link (currently valid for about one hour, subject to change). Do not persist it. Call GET /labels/{id} again to obtain a fresh URL when you need to download.
  • Formats — Set label.format to "PDF" or "PNG" when creating a label. Omitting it selects PDF. GET /labels/{id} returns the selected format as lowercase labelFormat: "pdf" or "png"; it does not change the format. The examples on this page retrieve a PDF label.
  • Re-retrieval — Each call returns a fresh URL for the same document. The document content is stable; the URL string is not.

Batch retrieval

Retrieve multiple label documents in a single request by passing comma-separated identifiers. You can mix label UUIDs and customer order numbers. How the identifier list is processed:
  • The path parameter is split on commas. Each piece is trimmed, empty pieces are dropped, and duplicates are collapsed, so a,,a, b is treated as a,b.
  • One remaining identifier returns the single-label response (404 if it does not exist, 422 if the label failed at the courier). Two or more return the labels array shape described below.
  • Labels that do not exist and labels whose courier submission failed are omitted from labels without an error entry. If none of the identifiers resolve, the request returns 404.
  • There is no enforced maximum today. Keep batches small (tens, not hundreds); each identifier resolves a document from the courier.
New label requests reject commas in customerOrderNumber; see Customer order numbers for the current restrictions. If a legacy record has a comma in its order number, retrieve it using the label UUID because this endpoint splits identifiers on commas.

Batch response

200 OK
Missing or failed labels are silently omitted from the response. Compare the returned labels array against your requested identifiers to detect any that were not resolved.

Error handling

Next steps

Track the shipment

Monitor shipment progress after printing and attaching the label.

Error Handling

Full reference for all HTTP status codes and error response formats.