0
私は出荷追跡をテストしており、私のコントローラで情報を取得しています。しかし、別の場所にJavaScriptコードの行を追加すると、追跡は常に不明を返します。追跡が正確で、未知数が常に返されるか、私のコードで何か問題があるかどうかはわかりません。トラッカーIDは保存されていますので、いつでも簡単にテストできます。Easypost出荷追跡の問題
これは未知の状態である注文の詳細の1つです。
{
"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": []
}
:あなたのケースでは
は(この記事の時点で)、USPSは、ステータスのいずれかを持っていません。それは私のテストのほとんどが行った方法です。約5分ですべての結果を送り返します – Nello
テスト環境では、EasyPost(例:EZ4000000004)が提供するトラッキングコードを使用してトラッカーを作成する必要があります(https://www.easypost.com/docs)。/api#testing-specific-tracking-states – KFunk