Skip to content

Cancel Orders

Request Method

http
POST /openapi/order/cancel-orders

NOTE

all time is standardized as UTC+8

Authentication

ApiKeyAuth

Steps:

  1. Prepare: $APP_NAME, $API_KEY, and capture a timestamp $TS.
  2. Concatenate an input string for MD5: $INPUT = $APP_NAME(lowercase) + $API_KEY + $TS
  3. Calculate MD5: $TOKEN = md5($INPUT) (all ).
  4. Set the $TOKEN to "x-auth-token" HTTP header.
  5. Set the $APP_NAME to "x-auth-name" HTTP header.
  6. Set the timestamp ($TS) to "x-auth-seed" HTTP header.

Note: the $TS value should be a UNIX timestamp (13-digit, milisecond).

FieldDescription
Content-Typeapplication/json
x-auth-token$TOKEN
x-auth-name$APP_NAME
x-auth-seed$TS

Parameter

FieldMandatoryTypeDescriptionLength
tracking_numsYArray

Request

json
{
    "tracking_nums": [
      "WR0BL260000046SG", 
      "SPXSG066849392891", 
      "SPXSG068750771351", 
      "C251230155241302430003",
      "NZ2601089000005",
      "SPXSG061914269951"
    ]
}

The error code

CodeDescription
0success
1fail

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": []
}