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 scan-form - Batch Scan Form
URL: /api/order/scan-form · Description: Aggregate the tracking numbers of a batch of "printed" orders under the same channel into one scan form (e.g. a USPS Scan Form) so they can be scanned into the network in a single pass. Only channels that implement scanForm are supported (other channels return a clear error).
Usage conditions:
- Only some channel services support this endpoint. Please consult your account manager to confirm availability.
- The
ship_dateof the associated orders must be a date after today (i.e. later than the current date, today excluded).
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
order_id |
One of two | array / string | List of order IDs. Mutually exclusive with order_no (pass one or the other). The value may be an array, or a string separated by semicolons (;) (the backend also tolerates comma / newline / whitespace separators). Pure-integer values are queried as order_id and only "printed" orders belonging to the current vendor are valid. |
order_no |
One of two | array / string | List of order numbers. Mutually exclusive with order_id (pass one or the other). Same value and separator rules as above; non-integer values are queried as order_no. |
Request Example
POST /api/order/scan-form
Header: vendor-token: xxxxx
Content-Type: application/json
{
"order_id": [1024, 1025, 1026]
}
POST /api/order/scan-form
Header: vendor-token: xxxxx
Content-Type: application/json
{
"order_no": "AB20240101;AB20240102;AB20240103"
}
Response Example (data is the channel's unified structure)
{
"success": true,
"message": "Batch scan form created successfully!",
"code": 200,
"data": {
"scanFormNo": "SF1234567890", // Scan form number
"scanFormLabel": "https://cdn.example.com/scanform/SF1234567890.pdf" // Scan form label URL
}
}