Skip to content
This page is not yet translated. Showing English content.

Order Tracking ​

POST/channel/api/v1/order/tracking

Auth: request-token (channel_partner)

Return logistics tracking events for an order. You may query by either order_id (preferred) or tracking_number. When both are sent, order_id wins and tracking_number is ignored. The partner's shop scope is enforced in both cases.

Request Headers ​

HeaderRequiredDescription
request-tokenyesChannel partner app token
Content-Typeyesapplication/json

Request Body ​

Provide at least one of the following:

FieldTypeRequiredDescription
order_idintegerno*Order ID (preferred). When > 0 the order is queried directly
tracking_numberstringno*Tracking number. Used to reverse-lookup the order

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 1,
      "tracking_number": "1Z999AA10123456784",
      "carrier": "UPS",
      "event_time": "2026-08-13 14:30:00",
      "event_description": "Shipped",
      "event_location": "",
      "raw_data": {
        "stage": "delivered",
        "sub_status": null,
        "barcode": null,
        "event_id": "evt-1"
      }
    }
  ]
}

Behavior Notes ​

  • By order_id: The order is loaded and its shop_id is verified against the partner's bound set; a missing or out-of-scope order returns 403.
  • By tracking_number: The system looks up the order package, resolves the order, and verifies shop scope. If the tracking number does not exist or the order is out of scope, an empty array (200) is returned instead of 403, so tracking numbers cannot be used to probe other partners' orders.
  • Event order: Events are flattened in the order returned by the carrier and are not re-sorted by time; sort by event_time yourself when you need a timeline.
  • Fields: carrier may be null when the carrier record is missing; event_location is always an empty string; raw_data keeps the original stage / sub_status / barcode / event_id values.
  • pickup_no is not supported — it can link orders across shops and has no clear single-partner semantics.

Error Codes ​

codeMeaning
909Missing/invalid token, disabled app, or non-channel_partner type
403order_id points to an order outside the partner's shop scope
400Neither order_id nor tracking_number was provided
200 (empty array)Tracking number not found, or no events yet

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/order/tracking' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "order_id": 456
}'