Get parcel's label
The label is a PDF you print and stick on the physical package. The driver scans it during the pickup and the delivery, so the parcel needs one for any modality where it travels through the network rather than straight from your counter to the recipient.
Request
curl --request GET \
--url https://logistics.api.{{BASE_ENV_URL}}/v1/parcels/{{PARCEL_ID}}/label \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'The parcel must already exist — see Create a parcel — and {{PARCEL_ID}} is the platform-assigned id it was created with.
Response
200 returns the label as application/pdf, ready to print. The response body is the PDF itself, not JSON — write it to a file rather than parsing it.
/warehouse/labelis deprecatedAn older endpoint,
GET /v1/parcels/{parcel_id}/warehouse/label, returns the same thing and is kept only for existing integrations. Use/labelfor anything new.
When it fails
| Status | Meaning |
|---|---|
401 | Missing or invalid access token. |
403 | The parcel is not yours. |
404 | No parcel with that ID. |
See Error handling.
Updated 2 days ago
Did this page help you?
