Easypost货件追踪问题

时间:2017-08-02 18:55:06

标签: easypost

我一直在测试货件跟踪,我通过我的控制器获取信息。但是,当我在其他地方添加一行javascript代码时,跟踪始终返回未知。我不确定跟踪是否正确,并且总是返回未知或我的代码有问题。我存储了跟踪器ID,因此我总是可以在easypost上测试它。

这是订单状态未知的详细信息之一。



{
  "id": "trk_884a31a503b745a7836c9fbed33212d5",
  "object": "Tracker",
  "mode": "test",
  "tracking_code": "9470136897846111103191",
  "status": "unknown",
  "status_detail": "unknown",
  "created_at": "2017-08-02T18:44:24Z",
  "updated_at": "2017-08-02T18:44:24Z",
  "signed_by": null,
  "weight": null,
  "est_delivery_date": null,
  "shipment_id": "shp_7bc893df86a94607b6d85a740a5ed3cb",
  "carrier": "USPS",
  "tracking_details": [],
  "fees": [],
  "carrier_detail": null,
  "public_url": "the url of the label"
}




这是我的正常订单状态。



{
  "id": "trk_bbacef9dece94ced96e07a447021d9d9",
  "object": "Tracker",
  "mode": "test",
  "tracking_code": "9461236897846111100762",
  "status": "delivered",
  "status_detail": "arrived_at_destination",
  "created_at": "2017-08-02T18:43:39Z",
  "updated_at": "2017-08-02T18:46:39Z",
  "signed_by": "John Tester",
  "weight": null,
  "est_delivery_date": "2017-08-02T18:46:39Z",
  "shipment_id": "shp_c888e36c1c6b41418160d7d21bcd832a",
  "carrier": "USPS",
  "tracking_details": [
    {
      "object": "TrackingDetail",
      "message": "Pre-Shipment Info Sent to USPS",
      "status": "pre_transit",
      "status_detail": "status_update",
      "datetime": "2017-07-02T18:46:39Z",
      "source": "USPS",
      "carrier_code": null,
      "tracking_location": {
        "object": "TrackingLocation",
        "city": null,
        "state": null,
        "country": null,
        "zip": null
      }
    },
    {
      "object": "TrackingDetail",
      "message": "Shipping Label Created",
      "status": "pre_transit",
      "status_detail": "status_update",
      "datetime": "2017-07-03T07:23:39Z",
      "source": "USPS",
      "carrier_code": null,
      "tracking_location": {
        "object": "TrackingLocation",
        "city": "HOUSTON",
        "state": "TX",
        "country": null,
        "zip": "77063"
      }
    }
  ],
  "carrier_detail": {
    "object": "CarrierDetail",
    "service": "First-Class Package Service",
    "container_type": null,
    "est_delivery_date_local": null,
    "est_delivery_time_local": null,
    "origin_location": "HOUSTON TX, 77001",
    "origin_tracking_location": {
      "object": "TrackingLocation",
      "city": "NORTH HOUSTON",
      "state": "TX",
      "country": null,
      "zip": "77315"
    },
    "destination_location": "CHARLESTON SC, 29401",
    "destination_tracking_location": {
      "object": "TrackingLocation",
      "city": "CHARLESTON",
      "state": "SC",
      "country": null,
      "zip": "29407"
    },
    "guaranteed_delivery_date": null,
    "alternate_identifier": null,
    "initial_delivery_attempt": "2017-07-05T08:37:39Z"
  },
  "finalized": true,
  "is_return": false,
  "public_url": "label url",
  "fees": []
}




1 个答案:

答案 0 :(得分:0)

即使提供了跟踪代码,USPS也不会立即开始跟踪。通常,您必须等到包裹进入邮件流之后才能看到任何有用的status / tracking_details

在您的情况下(在本文发布时),USPS也没有状态:https://tools.usps.com/go/TrackConfirmAction?tLabels=9470136897846111103191