Retrieve Shipping Label

Use this endpoint to retrieve a shipping label after booking a shipment.

REST Endpoint

GET /restapi/v1/customers/:customerId/shipments/:bookNumber/label/:labelImageFormat

Response Status Code

200 OK

Response Content Type

The reponse content type will depend on the labelImageFormat that is specified in the url.

If labelImageFormat is PDF, the response content type will be application/pdf.

If labelImageFormat is PNG, the response content type will be application/json.

All labels can be returned in PDF format. PNG is a new format option and is not supported for all carriers. If the label can not be returned in the format specified, an error message will be returned.

Response JSON Example (PNG)

{
  "labelImageFormat": "PNG",
  "base64Images": [
      "....base64 encoded content....",
      "....base64 encoded content...."
  ]
}