跳转到主要内容
获取货件的当前状态和事件历史记录。

请求

GET /track?trackingId=<trackingId>
请求头
AuthorizationBearer <accessToken>

查询参数

参数类型必填描述
trackingIdstring货件追踪ID(格式:UR + 17位数字,或URB + 16位数字)

响应

{
  "success": true,
  "message": "Success",
  "data": {
    "trackingId": "UR12345678901234567",
    "shipmentStatus": "OUT_FOR_DELIVERY",
    "statusCode": 201,
    "orderNumber": "ORD-2026-001",
    "batchId": "URB1234567890123456",
    "note": "",
    "signatureRequired": false,
    "weight": {
      "value": 2.5,
      "weightUnit": "kg"
    },
    "dimensions": {
      "length": 30,
      "width": 20,
      "height": 15,
      "dimensionUnit": "cm"
    },
    "recipient": {
      "fullName": "John Doe",
      "phone": "604-555-0123",
      "email": "john@example.com"
    },
    "destination": {
      "address1": "123 Main St",
      "address2": "Suite 100",
      "city": "Vancouver",
      "province": "BC",
      "postalCode": "V6B 1A1",
      "country": "CA",
      "latitude": 43.6426,
      "longitude": -79.3871
    },
    "events": [
      {
        "status": "OUT_FOR_DELIVERY",
        "statusCode": 201,
        "timestamp": 1773066600000,
        "description": "Package is out for delivery",
        "location": {
          "name": "Toronto Warehouse",
          "lat": 43.7,
          "lng": -79.4
        }
      },
      {
        "status": "RECEIVED",
        "statusCode": 191,
        "timestamp": 1772956800000,
        "description": "Package received at facility",
        "location": {
          "name": "Toronto Warehouse",
          "lat": 43.7,
          "lng": -79.4
        }
      },
      {
        "status": "PENDING",
        "statusCode": 181,
        "timestamp": 1772899200000,
        "description": "",
        "location": null
      }
    ]
  }
}
有关shipmentStatusstatusCode值的完整列表,请参见货件状态参考

错误响应

{
  "success": false,
  "message": "TokenExpiredError",
  "errorCode": "TokenExpiredError"
}