API Documentation
API documentation:
1. Authenticate with the vendor-token request header; please contact your business manager.
2. Use the API domain; please contact your business manager.
POST print - Create Order / Print Label
URL: /api/order/print · Description: Submit the order and get the label. Returns the order info and the label URL.
⚠ Important: print contains ALL parameters of
rate (address / package / unit / extra services are identical),
and adds the following required parameters on top of rate: shipping_code, shipping_service.
Parameters (= all rate parameters + the following additions / required)
| Parameter | Required | Type | Description |
|---|---|---|---|
shipping_code |
Yes | string | Channel code (optional in rate, required in print) |
shipping_service |
Yes | string | Channel service code (optional in rate, required in print) |
reference |
Optional | string | Order reference |
remark |
Optional | string | Order remark |
label_type |
Optional | string | Label type; only supported by some channels / interfaces, omitted means the channel default format is returned. Allowed values: PDF / ZPL / ZPL203DPI (any value outside this set returns a parameter error; note: zpl is short for ZPL300DPI) |
| All other parameters (shipper / recipient / package / unit / currency / is_signature / is_insurances / vendor_address_id / vendor_address_label) are identical to rate with the same required rules. See the rate parameter table and common parameters. | |||
Request Example (includes all rate parameters)
# Compared with rate, only the required channel parameters + reference/remark are added
POST /api/order/print
Header: vendor-token: xxxxx
Content-Type: application/json
{
"shipping_code": "iusps",
"shipping_service": "zdgj",
"reference": "ORDER-20260921-001",
"remark": "please handle carefully",
"label_type": "PDF", // Optional: label type (PDF / ZPL / ZPL203DPI), only supported by some channels
"is_signature": 0,
"is_insurances": 0,
"shipper_name": "John",
"shipper_company": "Piggyship",
"shipper_telphone": "+1 213 555 0100",
"shipper_street1": "123 Main St",
"shipper_city": "Los Angeles",
"shipper_state": "CA",
"shipper_country": "US",
"shipper_zipcode": "90001",
"recipient_name": "Jane",
"recipient_company": "ABC Inc",
"recipient_telphone": "+1 212 555 0199",
"recipient_street1": "456 Oak Ave",
"recipient_city": "New York",
"recipient_state": "NY",
"recipient_country": "US",
"recipient_zipcode": "10001",
"packages": [
{
"name": "dress",
"length": 12,
"width": 10,
"height": 5,
"weight": 3.3,
"weight_unit": "lb",
"length_unit": "in"
}
]
}
Response Example (data is the order result)
{
"success": true,
"message": "Order created successfully!",
"code": 200,
"data": {
"success": true,
"message": "success",
"fee": 15.05, // Deducted amount
"zone": "zone8",
"billing_weight": 3.3069,
"currency_id": 1,
"order_id": 1024, // System order ID
"label": "https://cdn.xxx.com/label/123_1699999999.pdf", // Label PDF URL
"tracking": "20260921153000_ab12cd", // System order number (note: NOT the label number)
"ext_tracking": "9212345678901234567890", // Channel tracking/label number
"fee_detail": [{"code": "shipping_fee","name": "Shipping Fee","amount": 15.05}] // Fee detail list
}
}
| data field | Type | Description |
|---|---|---|
order_id |
int | System order ID |
fee / zone / billing_weight / currency_id |
- | Fee / Zone / Billing weight / Currency |
label |
string | Label PDF URL (CDN), can be downloaded and printed directly |
tracking |
string | System order number |
ext_tracking |
string | Channel tracking/label number (used to query tracking) |
fee_detail |
array | List of fee details |