查询轨迹

通过此接口,可以使用处理号、跟踪号或者客单号查询包裹的轨迹信息。

请求规格说明

请求说明

GET /api/trackPoints?trackingNumber={trackingNumber}

trackingNumber 的值可为处理号、跟踪号或者客单号。

系统以处理号、跟踪号以及客单号的顺序来判定输入值的类型。

注:花括号{}为参数占位符,实际请求中无需传递

返回数据格式说明

名称 类型 描述
Match string 匹配值类型,只要此值不为 Unknown,即表示找到了与输入值匹配的包裹
Unknown: 未能匹配到任何处理号、跟踪号或者客单号
ParcelId: 请求值为处理号
ParcelTrackingNumber: 请求值为包裹跟踪号
ParcelReferenceId: 请求值为包裹的客单号
TrackingNumber string 请求值
Status string 包裹投递状态,输入值未匹配到任何包裹时,此值为空
DataReceived: 收到数据
InTransit: 运输途中
DeliveryReady: 到达待取
DeliveryTried: 尝试投递失败。部分渠道会尝试投递数次
Delivered: 已妥投
DeliveryFailed: 投递失败。 地址问题、尝试投递数次均失败、收件人搬家或拒收等
Returned: 已退回
Lost: 包裹遗失
TrackSummary string 轨迹状态概述
PODReady bool POD文件是否已就绪,如果为 true,可通过下载 POD 接口下载 POD 文件
DeliveryPhotoReady bool 投递照片是否已就绪,如果为 true,可通过下载投递照片接口下载投递照片
Metadata Metadata 包裹元数据,输入值未匹配到任何包裹时,此值为 null
TrackPoints TrackingPoint[] 轨迹

包裹元数据

名称 类型 描述
TrackItemId string 包裹处理号
ReferenceId string 客单号
TrackingNumber string 包裹最终跟踪号
FlightNumber string 航班号
ShippingProductId string 物流产品代码
ShippingServiceId string 物流服务代码
OriginCountryCode string 包裹发件人所在国家代码
DestinationCountryCode string 包裹收件人所在国家代码

包裹轨迹

名称 类型 描述
Time string ISO 8601 标准格式化时间
TimeZone float 轨迹发生地时区,可能为空
Status string 关键节点状态
Location string 地点
Content string 轨迹内容

返回数据示例

妥投包裹返回数据示例

{
    "Data": {
        "Match": "ParcelId",
        "TrackingNumber": "WNBAA0048411227YQ",
        "Status": "Delivered",
        "TrackSummary": "",
        "PODReady": false,
        "Metadata": {
            "TrackItemId": "",
            "ReferenceId": "",
            "TrackingNumber": "",
            "FlightNumber": "",
            "TrackItemType": "Parcel",
            "ShippingProductId": "",
            "ShippingServiceId": "",
            "OriginCountryCode": "CN",
            "DestinationCountryCode": "DE",
            "DeliveredOn": "2019-01-10T10:24:00Z"
        },
        "TrackPoints": [
            {
                "Time": "2019-01-03T15:35:25Z",
                "TimeZone": null,
                "Status": null,
                "Location": "",
                "Content": "Parcel Data Received"
            },
            {
                "Time": "2019-01-04T05:25:13Z",
                "TimeZone": null,
                "Status": null,
                "Location": "Shenzhen",
                "Content": "Parcel picked up"
            },
            {
                "Time": "2019-01-04T14:25:12Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "Shenzhen",
                "Content": "Parcel received at Shenzhen Sorting Centre."
            },
            {
                "Time": "2019-01-04T14:25:12Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "Shenzhen",
                "Content": "Parcel processed at Shenzhen Sorting Centre."
            },
            {
                "Time": "2019-01-04T21:02:35Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "Shenzhen",
                "Content": "Parcel departure in Shenzhen Sorting Centre."
            },
            {
                "Time": "2019-01-05T07:02:45Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "HongKong Sorting Centre",
                "Content": "Parcel arrived at transit facility"
            },
            {
                "Time": "2019-01-05T08:00:00Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "HongKong Sorting Centre",
                "Content": "Parcel departure in HongKong Sorting Centre heading to Hong Kong Airport, estimated flight departure time is 2019-01-05 18:00 HK time, Parcel Departure"
            },
            {
                "Time": "2019-01-06T22:29:00Z",
                "TimeZone": 8,
                "Status": null,
                "Location": "Hong Kong Airport",
                "Content": "Parcel is leaving Hong Kong Airport, estimated arrival time at destination airport is 2019-01-07 17:10 UTC time, Parcel Leaving Port"
            },
            {
                "Time": "2019-01-07T17:33:00Z",
                "TimeZone": 1,
                "Status": null,
                "Location": ",",
                "Content": "Parcel arrives at Airport, Parcel Arrival"
            },
            {
                "Time": "2019-01-08T02:22:37Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "Germany",
                "Content": "Parcel arrives at customs"
            },
            {
                "Time": "2019-01-08T06:54:25Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "Germany",
                "Content": "Parcel is leaving the customs"
            },
            {
                "Time": "2019-01-09T16:19:00Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "Obertshausen",
                "Content": "The shipment has been processed in the parcel center of origin"
            },
            {
                "Time": "2019-01-09T22:20:00Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "Feucht",
                "Content": "The shipment has been processed in the destination parcel center"
            },
            {
                "Time": "2019-01-10T07:21:00Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "",
                "Content": "The shipment has been loaded onto the delivery vehicle"
            },
            {
                "Time": "2019-01-10T10:24:00Z",
                "TimeZone": 1,
                "Status": null,
                "Location": "",
                "Content": "The shipment has been successfully delivered"
            }
        ]
    },
    "Succeeded": true,
    "Error": null
}

输入值未匹配到包裹返回数据示例

{
  "Data": {
    "Match": "Unknown",
    "TrackingNumber": "ABCD0123",
    "Status": null,
    "Metadata": null,
    "TrackPoints": []
  },
  "Succeeded": true,
  "Error": null
}