試圖創建每https://goshippo.com/docs/multipiece七寶API - 多件貨返回空rates_list
我指定我的請求異步=假的多件貨,但我發現在響應中返回一個空rates_list。編輯補充說,來自我編輯的地址都是有效的(家庭和辦公室),我已經能夠成功地使用它們進行單件測試發貨,而不是多件商品。
請求負載(我道歉,如果這些都是亂七八糟的,我不能讓SO格式化JSON):
{ "object_purpose": "PURCHASE", "address_from": { "object_state":null, "object_purpose":"PURCHASE", "object_source":null, "object_created":null, "object_updated":null, "object_owner":null, "name":"REDACTED", "company":"REDACTED", "street1":"REDACTED", "street_no":"", "street2":"", "city":"REDACTED", "state":"REDACTED", "zip":"REDACTED", "country":"US", "phone":"REDACTED", "email":"REDACTED", "ip":null, "metadata":null, "is_residential":null, "validate":false, "object_id":null, "object":"unknown" }, "address_to": { "object_state":null, "object_purpose":"PURCHASE", "object_source":null, "object_created":null, "object_updated":null, "object_owner":null, "name":"Tony Stark", "company":"Stark Enterprises", "street1":"REDACTED", "street_no":null, "street2":"", "city":"REDACTED", "state":"REDACTED", "zip":"REDACTED", "country":"US", "phone":null, "email":"REDACTED", "ip":null, "metadata":null, "is_residential":null, "validate":false, "object_id":null, "object":"unknown" }, "parcel": [ { "object_state":null, "object_created":null, "object_updated":null, "object_owner":null, "length":"20", "width":"20", "height":"20", "distance_unit":"in", "weight":1.5, "mass_unit":"lb", "metadata":null, "object_id":null, "object":"unknown" }, { "object_state":null, "object_created":null, "object_updated":null, "object_owner":null, "length":"20", "width":"20", "height":"20", "distance_unit":"in", "weight":1.5, "mass_unit":"lb", "metadata":null, "object_id":null, "object":"unknown" }, { "object_state":null, "object_created":null, "object_updated":null, "object_owner":null, "length":"20", "width":"20", "height":"20", "distance_unit":"in", "weight":2.6, "mass_unit":"lb", "metadata":null, "object_id":null, "object":"unknown" } ], "async": false }
響應:
`{ 「異步」:空, 「object_state」: 「有效」, 「object_status」: 「SUCCESS」, 「object_purpose」: 「購買」, 「object_created」: 「2016-12-13T20:33:20.318Z」, 「object_updated」: 「2016-12-13T20:33:20.318Z」, 「object_owner對」: 「絕密」, 「address_from」: 「e0633e8c3f3a4a19ba6a83998906da02」, 「address_to」: 「b48de7caf2624803adba6cac2b10e1f5」, 「address_return」: 「e0633e8c3f3a4a19ba6a83998906da02」, 「包裹」:[ 「ec25a9566fdd47ef9d728307b76eca35」, 「be5e95a487644abd875f6049a32621fc 「 」de942d19ef8046e49011c3b1971c2dc8「 ], 」submission_type「: 」PICKUP「, 」submission_date「: 」2016-12-13T15:33:18Z「, 」insurance_amount「: 」0.0「, 」insurance_currency「:」 USD「, 」extra「:{
}, 「customs_declaration」:空, 「reference_1」: 「」, 「reference_2」: 「」, 「rates_url」: 「https://api.goshippo.com/shipments/4f1e4a275ca341dda8cb31eed746720f/rates/」, 「rates_list」:[
], 「元數據」:」 」, 「消息」:[
], 「的object_id」: 「4f1e4a275ca341dda8cb31eed746720f」, 「對象」: 「未知」 }`
的rates_url同樣沒有給出結果:
{「count」:0,「next」:null,「previous」:null,「results」:[]}
哦,沒關係。我是「測試模式」的受害者,顯然它只支持美國郵政,根據我鏈接的文檔不支持多件貨物。 – Lamont
Shippo測試模式確實支持所有的運營商,但是你說得對,多件貨物只有UPS和FedEx支持。 Shippo不提供內置的UPS/FedEx賬戶,因此您需要在測試和/或實時模式下添加自己的UPS/FedEx賬戶以獲得費率。 –