Shippo API - Multipiece货件返回空的rates_list

时间:2016-12-13 20:55:03

标签: shippo

尝试按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 }

响应:

`{    "异步":空,    " object_state":" VALID&#34 ;,    " object_status":" SUCCESS&#34 ;,    " object_purpose":" PURCHASE&#34 ;,    " object_created":" 2016-12-13T20:33:20.318Z&#34 ;,    " object_updated":" 2016-12-13T20:33:20.318Z&#34 ;,    " OBJECT_OWNER":"删节&#34 ;,    " address_from":" e0633e8c3f3a4a19ba6a83998906da02&#34 ;,    " address_to":" b48de7caf2624803adba6cac2b10e1f5&#34 ;,    " address_return":" e0633e8c3f3a4a19ba6a83998906da02&#34 ;,    "包裹":[       " ec25a9566fdd47ef9d728307b76eca35&#34 ;,       " be5e95a487644abd875f6049a32621fc&#34 ;,       " de942d19ef8046e49011c3b1971c2dc8"    ]    " submission_type":" PICKUP&#34 ;,    " submission_date":" 2016-12-13T15:33:18Z&#34 ;,    " insurance_amount":" 0.0&#34 ;,    " insurance_currency":" USD&#34 ;,    "额外" {

},    " customs_declaration":空,    " reference_1":"&#34 ;,    " reference_2":"&#34 ;,    " rates_url":" https://api.goshippo.com/shipments/4f1e4a275ca341dda8cb31eed746720f/rates/&#34 ;,    " rates_list":[

]    "元数据":"&#34 ;,    "消息":[

]    "的object_id":" 4f1e4a275ca341dda8cb31eed746720f&#34 ;,    "对象":"未知" }`

rates_url同样没有结果:

{&#34; count&#34;:0,&#34; next&#34;:null,&#34; previous&#34;:null,&#34; results&#34;:[]} < / p>

1 个答案:

答案 0 :(得分:1)

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