物流助手 电子面单

获取支持的快递公司列表

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getAllDelivery.html

  1. $app->express->listProviders();
  2. {
  3. "count": 8,
  4. "data": [
  5. {
  6. "delivery_id": "BEST",
  7. "delivery_name": "百世快递"
  8. },
  9. ...
  10. ]
  11. }

生成运单

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.addOrder.html

  1. $app->express->createWaybill($data);
  2. // 成功返回
  3. {
  4. "order_id": "01234567890123456789",
  5. "waybill_id": "123456789",
  6. "waybill_data": [
  7. {
  8. "key": "SF_bagAddr",
  9. "value": "广州"
  10. },
  11. {
  12. "key": "SF_mark",
  13. "value": "101- 07-03 509"
  14. }
  15. ]
  16. }
  17. // 失败返回
  18. {
  19. "errcode": 9300501,
  20. "errmsg": "delivery logic fail",
  21. "delivery_resultcode": 10002,
  22. "delivery_resultmsg": "客户密码不正确"
  23. }

取消运单

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.cancelOrder.html

  1. $app->express->deleteWaybill($data);

获取运单数据

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getOrder.html

  1. $app->express->getWaybill($data);

查询运单轨迹

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getPath.html

  1. $app->express->getWaybillTrack($data);

获取电子面单余额。

仅在使用加盟类快递公司时,才可以调用。

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getQuota.html

  1. $app->express->getBalance($deliveryId, $bizId);
  2. // 例如:
  3. $app->express->getBalance('YTO', 'xyz');

绑定打印员

若需要使用微信打单 PC 软件,才需要调用。

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.updatePrinter.html

  1. $app->express->bindPrinter($openid);

解绑打印员

若需要使用微信打单 PC 软件,才需要调用。

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.updatePrinter.html

  1. $app->express->unbindPrinter($openid);