Get API key
Authenticated — all requests require Authorization: Bearer mk_test_…Learn more
API ReferenceShipmentsDownload shipment label PDF

Download shipment label PDF

GET/api/v1/shipments/{shipment_id}/label

Downloads the carrier label PDF for one shipment, for EVERY carrier and channel — including a shipment booked through a partner carrier channel whose label_pdf_url (on the list/detail endpoints) stays permanently null. Requires the shipment to belong to the API key's account and environment; unknown shipment, cross-account, or cross-environment access all return the same 404. Poll label_available on GET /v1/shipments or GET /v1/shipments/{shipment_id} the same way the Labels guide already describes for label_pdf_url. A 409 with LABEL_SORT_PROCESSING_FAILED (1500202) means the iMile sorting information could not be verified or applied. Contact support. A 409 with SHIPMENT_SUPERSEDED (1500035) means the label is void. Read replaced_by from the shipment detail and download the replacement label.

Parameters

shipment_id*
stringpath
iMile tracking number for a shipment owned by the authenticated account.
download
stringquery
Set to 1 to receive the PDF as an attachment instead of inline.

Responses

Success body
{
  "content_type": "application/pdf",
  "body": "<binary bytes>"
}

Binary response

FieldTypeSample
content_typestringapplication/pdf
bodystring<binary bytes>