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/label is deprecated

An older endpoint, GET /v1/parcels/{parcel_id}/warehouse/label, returns the same thing and is kept only for existing integrations. Use /label for anything new.

When it fails

StatusMeaning
401Missing or invalid access token.
403The parcel is not yours.
404No parcel with that ID.

See Error handling.


Did this page help you?