Retrieve Shipping Label
Use this endpoint to retrieve a PDF shipping label after booking a shipment.
REST Endpoint
GET /restapi/v1/customers/:customerId/shipments/:bookNumber/label
Response Status Code
200 OK
Response Content Type
The reponse content type will depend on the labelImageFormat
that was used when the shipment was booked.
If labelImageFormat
was PDF
(or null), the response content type will be application/pdf
.
If labelImageFormat
was EPL2
, ZPL
, or PNG
, the response content type will be application/json
.
Response JSON Example (EPL2)
{
"labelImageFormat": "EPL2",
"base64Images": [
"....base64 encoded content....",
"....base64 encoded content...."
]
}
Response JSON Example (PNG)
{
"labelImageFormat": "PNG",
"base64Images": [
"....base64 encoded content....",
"....base64 encoded content...."
]
}
PNG Format Support
PNG format is supported for the following carriers:
- DHL eCommerce (dhlecommerce
)
If PNG format is requested for an unsupported carrier, an error message will be returned.