阿里巴巴商品运费计算查询接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
param_freight_template_request | FreightTemplateRequest | 必须 | {} | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
values | LogisticsSolution [] | {} | pojo |
|
1 2 3 4 5 6 7 8 9 10 11 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaShippingFreightCalculateRequest req = new AlibabaShippingFreightCalculateRequest(); AlibabaShippingFreightCalculateRequest.FreightTemplateRequest obj1 = new AlibabaShippingFreightCalculateRequest.FreightTemplateRequest(); obj1.setDestinationCountry( "US" ); obj1.setProductId(213421L); obj1.setQuantity(3L); obj1.setZipCode( "90001" ); obj1.setDispatchLocation( "CN" ); req.setParamFreightTemplateRequest(obj1); AlibabaShippingFreightCalculateResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < alibaba_shipping_freight_calculate_response > < values > < logistics_solution > < shipping_type >EXPRESS</ shipping_type > < trade_term >DAP</ trade_term > < dispatch_country >CN</ dispatch_country > < destination_country >US</ destination_country > < vendor_code >EX_ASP_Economy_Express_3C</ vendor_code > < vendor_name >Alibaba.com Economy Express (3C)</ vendor_name > < fee > < currency >USD</ currency > < amount >19.1</ amount > </ fee > < delivery_time >10~15</ delivery_time > </ logistics_solution > </ values > </ alibaba_shipping_freight_calculate_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|