GET /labels/{orderId}/{labelType}
Generate or return a cached label file for the given order and type.
Scope: shipments:labels or shipments:create
Path parameters
| Name | Required | Description |
|---|---|---|
orderId | Yes | Order UUID |
labelType | Yes | Label type code from available[].code (e.g. PDF, COMINV) |
Request body
None. Send X-API-Key on every request (including follow-up redirects from clients that support custom headers).
Preconditions
Same as list labels: order exists and belongs to the API key’s company.
Success response — label file (302)
When the label is ready (or served from cache), the handler returns a redirect to a signed S3 URL:
HTTP/1.1 302 Found
Location: https://…/signed-url…
Clients should follow the redirect to download the file (PDF, ZPL, etc.). No JSON body.
Success response — type list (200)
If the carrier does not return a file for the requested type (e.g. invalid or ambiguous type), the handler may respond with the same shape as GET /labels/{orderId} so you can pick a valid labelType:
{
"data": {
"orderId": "uuid-order-id",
"available": []
}
}
Error responses
| HTTP | Condition |
|---|---|
400 | Missing orderId |
401 | API key auth failure |
403 | Missing scope, or order belongs to another company |
404 | Order not found |
500 | Label generation error |