Skip to main content

Get Shipping Label

Retrieve the shipping label for a confirmed order in base64 format.

Endpoint

GET /v1/order/label

Request

Header Parameters


ParameterTypeRequiredExampleDescription
AuthorizationstringYesBearer YOUR_ACCESS_TOKENBearer access token used for authentication.
Content-TypestringYesapplication/jsonRequest body content type.

Query Parameters

ParameterTypeRequiredDescription
tracking_numberstringConditionalTracking number of the order. Required if order_id is not provided
order_idstringConditionalOrder ID. Required if tracking_number is not provided

Note: You must provide either tracking_number or order_id. If both are provided, tracking_number takes 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/json
data
json-string
Label response wrapper.
Expand for fields.
order_id
string
Unique order identifier.
Example: 3549605
tracking_number
string
Tracking number for the order.
Example: SF7444700423232
label
json-string
Label data.
Expand for fields.
format
string
Label format.
Example: pdf
encoding
string
Encoding type.
Always base64.
Example: base64
content
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/json
error.code
string
Error code.
Example: 400000
error.code_reason
string
Error reason.
Example: BAD_REQUEST
error.message
string
Human-readable message.
Example: Bad Request
error.error_trace
array
List of validation errors.
Expand for fields.
field
string
Request field that failed.
Example: order_id
message
string
Human-readable message.
Example: order_id is required when tracking_number is not provided

Response 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/json
code
string
Error code.
Example: 401000
code_reason
string
Error reason.
Example: UNAUTHORIZED
message
string
Human-readable message.
Example: Unauthorized
{
"error": {
"code": "401000",
"code_reason": "UNAUTHORIZED",
"message": "Unauthorized"
}
}

403 Forbidden

403 Forbidden

Response schema: application/json
error
json-string
Access forbidden for this resource.

404 Not Found

404 Not Found

Response schema: application/json
code
string
Error code.
Example: 400201
code_reason
string
Error reason.
Example: ORDER_NOT_FOUND
message
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/json
code
string
Error code.
Example: 500999
code_reason
string
Error reason.
Example: API_ERROR
message
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"
}
}