Get shipping label
GET /shipping/api/v1/shipments/{id}/label.{format}
GET
/shipping/api/v1/shipments/{id}/label.{format}
Retrieve the shipping label for a booked shipment.
Returns either an expiring URL or streams the file directly based on the redirect parameter.
Optionally add custom messages to the label.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
The remote shipment ID or tracking number
Example
prb851f578f format
required
string
Label format
Query Parameters
Section titled “Query Parameters ” redirect
boolean
If true, returns a 302 redirect to an expiring URL. If false or omitted, streams the file directly.
custom_messages
Array<string>
Array of custom messages to print on the label (e.g., custom_messages[]=MESSAGE1&custom_messages[]=MESSAGE2)
Example
?custom_messages=PDF%20CUSTOM%20MESSAGE%201&custom_messages=PDF%20CUSTOM%20MESSAGE%202Responses
Section titled “ Responses ”Label file streamed successfully
string format: binary
string format: binary
string
string format: binary
Redirect to expiring URL (when redirect=true)
Invalid label format
object
error_messages
required
List of error messages
Array<string>
[ "to_address is required"]{ "error_messages": [ "Invalid request parameters" ]}Shipment or label not found
object
error_messages
required
List of error messages
Array<string>
[ "to_address is required"]{ "error_messages": [ "Invalid request parameters" ]}