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.
1. Overview
The following conventions apply to all endpoints: Order APIs / Vendor APIs / Batch APIs.
Base Domain & Credentials
Both the base domain and the vendor-token are provided by your business manager —
please contact your business manager before starting the integration.
| Item | Description | How to obtain |
|---|---|---|
| Base domain | The base URL of the API; concatenated with the endpoint path below to form the full request URL,
e.g. https://<base-domain>/api/order/rate |
Contact your business manager |
vendor-token |
Vendor credential, carried in the request header of every request (see “Authentication” below) | Contact your business manager |
Endpoint Groups & URL
| Group | URL | Endpoints |
|---|---|---|
| Order APIs | /api/order/<action> |
rate / print / cancel / label / tracking / scan-form |
| Vendor APIs | /api/vendor/<action> |
set-web-hook / get-web-hook |
| Batch APIs | /api/order-batch/<action> |
create / lists / detail |
Method: Order APIs always use
POST;
query endpoints of the Vendor / Batch APIs use GET and submit endpoints use POST —
see the annotation on each endpoint page.
| Parameter | Description |
|---|---|
| Content-Type | application/json |
Authentication
Request Header: Every request must carry the
If the token is missing, invalid, or the vendor is disabled, the API returns
vendor-token header, whose value is the token field of the vendor (customer) table;
please contact your business manager to obtain this token (see “Base Domain & Credentials” above).
If the token is missing, invalid, or the vendor is disabled, the API returns
code = 100 and you need to log in again.
| Header | Required | Description |
|---|---|---|
vendor-token |
Yes | Vendor login token (the token field of the vendor table), contact your business manager |
Response Structure
{
"success": true, // true=success false=failure
"message": "Success message",
"msg": "Success message", // Same as message
"code": 200, // 200=success 400=failure 100=login required
"data": {} // Business data; empty array on failure
}
Status Codes
| code | Meaning | Description |
|---|---|---|
200 |
Success | success = true, business data is in data |
400 |
Failure | success = false, error message is in message / msg |
100 |
Login expired | Token missing / vendor not found / disabled / session expired; please obtain a new token |