运费查询
1、功能名称:运费查询
2、功能描述:运费查询
3、请求地址:https://ssl.glitzcloud.com/agent/v1/api/express/query
 测试地址:http://gztest.glitzcloud.com/agent/v1/api/express/query
4、请求方式:POST
5、请求参数
名称 | 类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
store_name | String | 是 | The Warehouse USA | 仓库名称 |
carrier | String | 否 | UPS | 快递公司 |
delivery | String | 否 | UPS Ground | 派送方式 |
package | String | 否 | Your Packaging | 包裹类型 |
postcode | String | 是 | 78781 | 邮编 |
weight | Float | 是 | 20 | 重量(kg) |
length | Float | 是 | 30 | 长(cm) |
width | Float | 是 | 20 | 宽(cm) |
height | Float | 是 | 30 | 高(cm) |
country_code | String | 否 | US | 国家二字码 |
state_code | Float | 否 | AL | 州二字码 |
6、请求示例
array( 'format'=>'json', 'apikey'=>'85082f5f62a811e684f500163e06045f', 'randoms'=>1234, 'sign'=>'656d6fbe6b7dec6c2e77ffe27f04bd6d', 'store_name' => 'The Warehouse USA', 'carrier' => 'UPS', 'delivery' => 'UPS Ground', 'package' => 'Your Packaging', 'postcode' => '78781', 'weight' => '20', 'length' => '30', 'width' => '20', 'height' => '30', 'country_code' => 'US', 'state_code' => 'AL', );
7、返回格式:JSON
8、返回示例:
正确时的返回JSON数据包如下:
{"status":200,"reqMsg":"ok","result":[{"basic_price":"11.12","fuel_rate":"5.5%","fuel_price":"0.61","additional_price":0,"remote_price":0,"flag":"success","price":11.73,"carrier":"UPS","delivery":"UPS Ground","package":"Your Packaging"},{"basic_price":"8.19","fuel_rate":"0","fuel_price":0,"additional_price":0,"remote_price":0,"flag":"success","price":"8.19","carrier":"UPS","delivery":"UPS SurePost","package":"Your Packaging"}]}
错误时的返回JSON数据包如下:
{"status":"2533","reqMsg":"Postcode is compulsory.","result":[]}
9、返回参数说明:
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
price | Float | 11.73 | 总价格 |
basic_price | Float | 11.12 | 基础价格 |
fuel_rate | Float | 5.5% | 燃油附加费率 |
fuel_price | Float | 0.61 | 燃油附加费价格 |
additional_price | Float | 0 | 附加费 |
remote_price | Float | 0 | 偏远地区费 |
reference_date | String | 1 ~ 5 day | 时效天数 |