查询物流信息,每天有一定的额度,当额度使用完了,就需要到,快宝开放平台注册账号并获取专属 API Key和 ID,然后将 Key和 ID ,配置环境变量 KUAIDIHELP_API_KEY, KUAIDIHELP_API_ID 即可继续使用。
~~~shell
export KUAIDIHELP_API_KEY= xxxxxxxxxxxxxxxx
export KUAIDIHELP_API_ID= xxxxxxxxxxxxxxxx
~~~
申通(sto),中通(zt),圆通(yt),韵达(yd),ems(ems) ,邮政(postx),极兔(jt),京东(jd),百世(ht),同城(kbtc),天天(tt),丰网(fw),顺丰(sf),国通(gt),众邮(zykd),德邦(dp),中通快运(ztky),安能快运(ane),壹米滴答(bt),丹鸟(dn),顺心捷达(sxjd),京广速递(kk),优速快递(ys),菜鸟速递(cnsd),笨鸟速运(bn)
接口描述: 通过收寄件人的相关信息,及物品信息,预估运费或者相关运费的查询。
接口参数:
接口调用
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py quotation '{\"sender\":{\"province\":\"
~~~
示例
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py quotation '{\"sender\":{\"province\":\"广东省\",\"city\":\"佛山市\",\"district\":\"南海区\",\"address\":\"南海大道北翠云苑二座802\"},\"recipient\":{\"province\":\"浙江省\",\"city\":\"嘉兴市\",\"district\":\"秀洲区\",\"address\":\"城东路2000号26幢商铺234号海螺电玩\"},\"pay_type\":\"2\",\"volume\":\"\",\"weight\":\"\"}'
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py quotation '{\"sender\":{\"province\":\"广东省\",\"city\":\"佛山市\",\"district\":\"南海区\",\"address\":\"南海大道北翠云苑二座802\"},\"recipient\":{\"province\":\"浙江省\",\"city\":\"嘉兴市\",\"district\":\"秀洲区\",\"address\":\"城东路2000号26幢商铺234号海螺电玩\"},\"pay_type\":\"2\",\"volume\":\"1\",\"weight\":\"1\"}'
~~~
接口描述: 通过运单号查询物流信息,当接口返回需要手机尾号时,提示让用户提供尾号。
接口参数:
接口调用
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py logistics '{\"waybill_codes\":\"
~~~
示例
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py logistics '{\"waybill_codes\":\"YT8852860437699\",\"phone\":\"\",\"result_sort\":\"0\"}'
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py logistics '{\"waybill_codes\":\"YT8852860437699,JT3009968654034\",\"phone\":\"\",\"result_sort\":\"0\"}'
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py logistics '{\"waybill_codes\":\"772058582798206\",\"phone\":\"6515\",\"result_sort\":\"0\"}'
~~~
接口描述:此接口是收集下单所需的收寄件人信息,接口返回下单的图片二维码,用户需微信扫码进行下单操作。
接口参数:
接口调用
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py order '{\"sender\":{\"shipper_province\":\"
~~~
示例
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py order '{\"sender\":{\"shipper_province\":\"广东省\",\"shipper_city\":\"佛山市\",\"shipper_district\":\"南海区\",\"shipper_address\":\"南海大道北翠云苑二座802\"},\"recipient\":{\"shipper_name\":\"李忧危\",\"shipper_mobile\":\"15302374691\",\"shipping_province\":\"浙江省\",\"shipping_city\":\"嘉兴市\",\"shipping_district\":\"秀洲区\",\"shipping_address\":\"城东路2000号26幢商铺234号海螺电玩\",\"shipping_name\":\"程序螺\",\"shipping_mobile\":\"15657366015\"},\"package_info\":\"\",\"package_weight\":\"\",\"package_note\":\"\",\"package_pics\":\"\",\"brand\":\"sto\",\"place_volume\":\"\",\"reserve_start_time\":\"\",\"reserve_end_time\":\"\",\"arrivePay\":\"1\"}'
~~~
输出要求
接口描述: 通过用户提供的 快递品牌,快宝订单号或者第三方订单号 ,取消订单
接口参数:
接口调用
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py cancel '{\"shipper_type\": \"
~~~
示例
~~~bash
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py cancel '{\"shipper_type\": \"zt\", \"order_id\": \"1204076252008035\", \"third_order_id\":\"\", \"reason\":\"\"}'
OPENCLAW_ALLOW_UNSAFE_EXEC=1 python scripts/kuaidihelp.py cancel '{\"shipper_type\": \"zt\", \"order_id\": \"\", \"third_order_id\":\"1204076252008033\", \"reason\":\"\"}'
~~~
共 1 个版本