1

尝试根据https://goshippo.com/docs/multipiece创建多件货件

我在我的请求中指定了 async = false,但我在响应中返回了一个空的 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 }

回复:

`{“异步”:null,“object_state”:“VALID”,“object_status”:“SUCCESS”,“object_ purpose”:“PURCHASE”,“object_created”:“2016-12-13T20:33:20.318Z”,“ object_updated":"2016-12-13T20:33:20.318Z", "object_owner":"REDACTED", "address_from":"e0633e8c3f3a4a19ba6a83998906da02", "address_to":"b48de7caf2624803adba6cac2b10e1f5", "address_return":"e0633e8c3f3a4a19ba6a83998906da02", "parcel ":[ "ec25a9566fdd47ef9d728307b76eca35", "be5e95a487644abd875f6049a32621fc", "de942d19ef8046e49011c3b1971c2dc8" ], "submission_type":"PICKUP", "submission_date":"2016-12-13T15:33:18Z", "insurance_amount":"0.0", "insurance_currency":"USD", "extra":{

}, "customs_declaration":null, "reference_1":"", "reference_2":"", "rates_url":" https://api.goshippo.com/shipments/4f1e4a275ca341dda8cb31eed746720f/rates/ ", "rates_list":[

],“元数据”:“”,“消息”:[

],“object_id”:“4f1e4a275ca341dda8cb31eed746720f”,“object”:“未知”}`

rate_url 同样没有给出任何结果:

{“计数”:0,“下一个”:空,“上一个”:空,“结果”:[]}

4

1 回答 1

1

我是 Shippo 的支持工程师。我查看了您对我们服务器进行的 API 调用,看起来 TO 和 FROM 地址是相同的。作为回报,您会得到一个空白响应,因为这两个字段不能相同,即使出于测试目的也是如此。我们知道我们需要有更好的错误消息,我们正在努力。如果您收到更多错误或空白回复,请发送电子邮件至 support@goshippo.com。

于 2016-12-14T23:34:30.953 回答