Shipments
Get Shipment Label
Download the shipping label of a UPS, DHL Express, DHL Paket or GO! shipment as a PDF
GET
/
api
/
v1
/
shipments
/
{id}
/
label
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}
Download the shipping label of a shipment. Print it and put it on the parcel before the carrier picks it up.
Requires the
A UPS or DHL Express parcel through customs needs only this label. We send the customs data to the carrier. See Customs.
shipments_view or shipments_manage scope.
| Carrier product | What you do |
|---|---|
| UPS and DHL Express | Print the label. With request_pickup, the carrier picks the parcel up in the pickup window. Without it, take the parcel to the carrier. |
| GO! | Print the label and put it on the parcel. The carrier picks it up in the pickup window. |
DHL pickup (dhl_parcel.retoure_pickup) | Nothing to print. The driver brings the label. This call returns 404. |
| Other DHL products (DHL Paket, Warenpost) | Print the label and take the parcel to DHL. |
| Rotrunner and Rapido couriers | Nothing to print. This call returns 404. |
Request
Path parameters
Shipment reference ID, as Create Shipment returns it (e.g.,
P261202KXTW).Response
On success, the API returns200 OK with the label as application/pdf, 100 × 150 mm. The file name
is label-{id}.pdf.
Error responses
| Status | Description |
|---|---|
400 | The ID is not a valid shipment reference. |
403 | The shipment is outside your API key’s access context. |
404 | The shipment does not exist, or it has no label to print. |
500 | Internal server error. |
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}
⌘I
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}