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.
8. Common Parameters (Address / Package) & Error Messages
rate and print share the following address and package parameters.
Shipper address parameters (shipper_*, optional; may pass vendor_address_id / vendor_address_label instead)
| Parameter | Description |
|---|---|
shipper_name |
Shipper name |
shipper_company |
Shipper company |
shipper_telphone |
Contact phone |
shipper_email |
|
shipper_country |
Country (e.g. US) |
shipper_state |
State / Province |
shipper_city |
City |
shipper_street1 / shipper_street2 |
Street address 1 / 2 |
shipper_zipcode |
Postal code / ZIP |
Recipient address parameters (recipient_*)
| Parameter | Required | Description |
|---|---|---|
recipient_name |
Yes | Recipient name |
recipient_street1 |
Yes | Street address 1 |
recipient_city |
Yes | City |
recipient_country |
Yes | Country (e.g. US) |
recipient_company |
Optional | Recipient company |
recipient_street2 |
Optional | Street address 2 |
recipient_zipcode |
Optional | Postal code / ZIP |
recipient_state |
Optional | State / Province |
recipient_email |
Optional | |
recipient_telphone |
Optional | Contact phone |
Package parameters (packages array, shared by rate/print)
| Parameter | Required | Description |
|---|---|---|
packages[i].name |
Optional | Package name / item name |
packages[i].length |
Yes | Length |
packages[i].width |
Yes | Width |
packages[i].height |
Yes | Height |
packages[i].weight |
Yes | Weight |
packages[i].weight_unit |
Yes | Weight unit: lb/g/kg/oz |
packages[i].length_unit |
Yes | Length unit: in/cm/m |
packages[i].unit |
Optional | Unit system, default 1 (metric) |
Error Messages Quick Reference (code=400, returned in message/msg)
| Endpoint | Error Message | Description |
|---|---|---|
| Common | Please provide the vendor ID! |
Vendor ID is missing |
| Common | Please provide the package info! |
No package info was passed |
| Common | Package N: dimensions and weight are incomplete! |
Package N has incomplete dimensions/weight |
| Common | Package N: invalid weight unit, only lb/g/kg/oz are supported! |
Package N has an invalid weight unit |
| Common | Package N: invalid length unit, only in/cm/m are supported! |
Package N has an invalid length unit |
| Common | Invalid weight unit / Invalid length unit, ... |
Invalid unit in the legacy single-package format |
| Common | Please provide the complete recipient address! |
Recipient address is incomplete (name/street1/city/country) |
Please provide the shipping code! |
Channel code is missing for order creation | |
Please provide the shipping service code! |
Channel service code is missing for order creation | |
Insufficient vendor balance, please top up first! |
Balance + credit ≤ 0, please top up first | |
Carrier not found |
Carrier does not exist | |
Label fetch timeout: waiting 1200s, ... |
Label fetch timed out | |
| cancel | Please provide the order ID! |
Order ID is missing |
| cancel | Order not found! |
Order does not exist, or is not owned by the current vendor (ownership check failure returns the same message) |
| cancel | Order already completed, cannot be canceled! |
The order is completed and cannot be canceled |
| cancel | Order already canceled, do not repeat! |
The order is already canceled; do not repeat the operation |
| cancel | Service not found for this order! |
The service for this order does not exist |
| label | Shipping not found for this order! |
The channel for this order does not exist |
| label | Label data is empty / Response missing base64code |
The channel did not return label data |
| Common | Channel passthrough errors (msgEn/Msg) |
Error messages returned by the channel API are returned as-is |