Appearance
Cancel Orders
Request Method
http
POST /openapi/order/cancel-ordersNOTE
all time is standardized as UTC+8
Authentication
ApiKeyAuth
Steps:
- Prepare:
$APP_NAME,$API_KEY, and capture a timestamp$TS. - Concatenate an input string for MD5:
$INPUT=$APP_NAME(lowercase) +$API_KEY+$TS - Calculate MD5:
$TOKEN= md5($INPUT) (all ). - Set the
$TOKENto "x-auth-token" HTTP header. - Set the
$APP_NAMEto "x-auth-name" HTTP header. - Set the timestamp (
$TS) to "x-auth-seed" HTTP header.
Note: the $TS value should be a UNIX timestamp (13-digit, milisecond).
Header
| Field | Description |
|---|---|
| Content-Type | application/json |
| x-auth-token | $TOKEN |
| x-auth-name | $APP_NAME |
| x-auth-seed | $TS |
Parameter
| Field | Mandatory | Type | Description | Length |
|---|---|---|---|---|
| tracking_nums | Y | Array |
Request
json
{
"tracking_nums": [
"WR0BL260000046SG",
"SPXSG066849392891",
"SPXSG068750771351",
"C251230155241302430003",
"NZ2601089000005",
"SPXSG061914269951"
]
}The error code
| Code | Description |
|---|---|
| 0 | success |
| 1 | fail |
Response(Success)
json
{
"code": 0,
"message": "success",
"data": {
"success": [
"WR0BL260000046SG",
"SPXSG066849392891",
"SPXSG068750771351"
],
"errors": [
{
"remarks": "Canceled",
"tracking_number": "C251230155241302430003"
},
{
"remarks": "No Record(s)",
"tracking_number": "NZ2601089000005"
},
{
"remarks": "Distribution process not found:dp id[660]",
"tracking_number": "SPXSG061914269951"
}
]
}
}Response(Fail)
json
{
"code": 1,
"message": "tracking_nums required",
"data": []
}