Get Shipping Label
Retrieve the shipping label for a confirmed order in base64 format.
Endpoint
GET /v1/order/label
Request
Header Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer YOUR_ACCESS_TOKEN | Bearer access token used for authentication. |
Content-Type | string | Yes | application/json | Request body content type. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tracking_number | string | Conditional | Tracking number of the order. Required if order_id is not provided |
order_id | string | Conditional | Order ID. Required if tracking_number is not provided |
Note: You must provide either
tracking_numberororder_id. If both are provided,tracking_numbertakes precedence.
Example request
With Tracking Number
curl -X GET "${API_URL}/v1/order/label?tracking_number=SF7444700423232" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json"
With Order ID
curl -X GET "${API_URL}/v1/order/label?order_id=3549605" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json"
Responses
200 Success
200 Success
Response schema:
application/jsondatajson-stringLabel response wrapper.
data
json-string
Label response wrapper.
order_id
string
Unique order identifier.
Example:
3549605tracking_number
string
Tracking number for the order.
Example:
SF7444700423232labeljson-stringLabel data.
label
json-string
Label data.
format
string
Label format.
Example:
pdfencoding
string
Encoding type.
Always
base64.Example:
base64content
string
Base64-encoded label content.
Example:
JVBERi0xLjUK... (truncated)Response sample
{
"data": {
"order_id": "3549605",
"tracking_number": "SF7444700423232",
"label": {
"format": "pdf",
"encoding": "base64",
"content": "JVBERi0xLjUK... (truncated)"
}
}
}
400 Bad Request
400 Bad Request
Response schema:
application/jsonerror.code
string
Error code.
Example:
400000error.code_reason
string
Error reason.
Example:
BAD_REQUESTerror.message
string
Human-readable message.
Example:
Bad Requesterror.error_tracearrayList of validation errors.
error.error_trace
array
List of validation errors.
field
string
Request field that failed.
Example:
order_idmessage
string
Human-readable message.
Example:
order_id is required when tracking_number is not providedResponse sample
{
"error": {
"code": "400000",
"code_reason": "BAD_REQUEST",
"message": "Bad Request",
"error_trace": [
{
"field": "order_id",
"message": "order_id is required when tracking_number is not provided"
}
]
}
}
401 Unauthorized
401 Unauthorized
Response schema:
application/jsoncode
string
Error code.
Example:
401000code_reason
string
Error reason.
Example:
UNAUTHORIZEDmessage
string
Human-readable message.
Example:
Unauthorized{
"error": {
"code": "401000",
"code_reason": "UNAUTHORIZED",
"message": "Unauthorized"
}
}
403 Forbidden
403 Forbidden
Response schema:
application/jsonerror
json-string
Access forbidden for this resource.
404 Not Found
404 Not Found
Response schema:
application/jsoncode
string
Error code.
Example:
400201code_reason
string
Error reason.
Example:
ORDER_NOT_FOUNDmessage
string
Human-readable message.
Example:
Order not found{
"error": {
"code": "400201",
"code_reason": "ORDER_NOT_FOUND",
"message": "Order not found"
}
}
500 Failure
500 Failure
Response schema:
application/jsoncode
string
Error code.
Example:
500999code_reason
string
Error reason.
Example:
API_ERRORmessage
string
Human-readable message.
Example:
Api Error, please contact customer service{
"error": {
"code": "500999",
"code_reason": "API_ERROR",
"message": "Api Error, please contact customer service"
}
}