API ReferenceShipmentsDownload shipment label PDF
Download shipment label PDF
GET
/api/v1/shipments/{shipment_id}/labelDownloads 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.
Parameters
shipment_id*
iMile tracking number for a shipment owned by the authenticated account.
download
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
| Field | Type | Sample |
|---|---|---|
| content_type | string | application/pdf |
| body | string | <binary bytes> |