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 batch detail - Batch Detail
URL: /api/order-batch/detail · Description: Query the batch information and per-order results (order no. / tracking no. / label / failure reason).
Note: Only batches submitted by the vendor identified by the current
vendor-token can be queried.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
id |
Yes | int | Batch ID (the batch_id returned by create) |
Request Example
GET /api/order-batch/detail?id=88
Header: vendor-token: xxxxx
Response Example
{
"success": true,
"code": 200,
"data": {
"batch": {
"id": 88,
"batch_no": "B20260921153000ab12",
"status": 2,
"status_text": "Completed",
"total_count": 2
},
"items": [
{
"row_no": 1,
"reference": "ORDER-20260921-001",
"parse_status_text": "Success",
"rate_status_text": "Quoted",
"print_status_text": "Printed",
"order_no": "20260921153000_ab12cd",
"tracking": "9212345678901234567890",
"label": "https://cdn.xxx.com/label/123_1699999999.pdf",
"print_fee": 15.05,
"fail_reason": ""
}
]
}
}
| data field | Type | Description |
|---|---|---|
batch |
object | Batch information (including status / status_text) |
batch.status |
int | Batch status: 0 Pending 1 Processing 2 Completed 3 Failed |
items |
array | Per-order details, returned in submission order |
items[].row_no |
int | Row number (starting from 1, matching the submission order) |
items[].reference |
string | Order reference number passed in when submitting |
items[].parse_status_text |
string | Validation result (Success / Failed) |
items[].rate_status_text |
string | Quote result: Not quoted / Quoted / Quote failed |
items[].print_status_text |
string | Print result: Not printed / Printed / Print failed |
items[].order_no |
string | System order number (returned after successful printing) |
items[].tracking |
string | Channel tracking number / label number (returned after successful printing) |
items[].label |
string | Label URL, can be downloaded and printed directly (returned after successful printing) |
items[].print_fee |
float | Actual charged amount |
items[].fail_reason |
string | Failure reason (returned when validation or printing fails; empty on success) |
Polling advice: while the batch
status is 0 Pending / 1 Processing the results are still being generated;
query periodically until it becomes 2 Completed. For a failed row, read its fail_reason.