Common logistics express a single query interface types and Docking

Currently there are two ways to express query interface can be docked, first and SF, tact, in the pass, every day, rhyme, courier company Debon these eleven docking interface, and second, third-party integration interfaces at a time so many docking and courier birds common courier. The first takes a long time, but is direct and courier companies, albeit indirectly second docking, but the simple docking, maintenance of the interface can be late a lot of time and labor costs province.

There are other companies to provide integrated interface, there are other needs can go, in fact, express the birds to meet the electricity supplier, ERP systems business of these companies needs. Here to talk about the courier birds, for example docking method.

Express Logistics query interfaces birds have free and paid versions, probably about docking cycle of the day, they have written a demo, can be used directly.

一.即时查询接口(免费)
  1. Interface rules

(1), according to the query interface supports Tracking Number (a single query, and transmits no more than 10 / S).

(2), stream waybill number corresponding to the specified selection Express encoding format will not return an error or failure information is encoded. The EMS should choose a single number stream encoding Express (EMS)

(3), and returns the stream tracking information in ascending chronological occurrence.

(4), 1002 interface commands.

(5), requests the address: Express Bird

  1. System level and application-level input parameters
    Common logistics express a single query interface types and Docking
    3. Return the result parameters
    Common logistics express a single query interface types and Docking
  2. Examples
    <br>{
    "OrderCode": "",
    "ShipperCode": "SF",
    "LogisticCode": "118650888018"
    }
    //返回示例<br>//没有物流轨迹的
    {
    "EBusinessID": "1109259",
    "Traces": [],
    "OrderCode": "",
    "ShipperCode": "SF",
    "LogisticCode": "118461988807",
    "Success": true,
    "Reason": null
    }
    //有物流轨迹的
    {
    "EBusinessID": "1109259",
    "OrderCode": "",
    "ShipperCode": "SF",
    "LogisticCode": "118461988807",
    "Success": true,
    "CallBack":"",
    "State": ,
    "Reason": null,
    "Traces": [
        {
            "AcceptTime": "2014/06/25 08:05:37",
            "AcceptStation": "正在派件..(派件人:邓裕富,电话:18718866310)[深圳 市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/25 04:01:28",
            "AcceptStation": "快件在 深圳集散中心 ,准备送往下一站 深圳 [深圳市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/25 01:41:06",
            "AcceptStation": "快件在 深圳集散中心 [深圳市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/24 20:18:58",
            "AcceptStation": "已收件[深圳市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/24 20:55:28",
            "AcceptStation": "快件在 深圳 ,准备送往下一站 深圳集散中心 [深圳市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/25 10:23:03",
            "AcceptStation": "派件已签收[深圳市]",
            "Remark": null
        },
        {
            "AcceptTime": "2014/06/25 10:23:03",
            "AcceptStation": "签收人是:已签收[深圳市]",
            "Remark": null
        }
    ]
    }

    2.2 receiving interface
    that is user after successful subscription form number and track updates in logistics, courier birds push customers through orders, subscription interface to subscribe in the courier waybill number of birds systems. AWB logistics information is updated, Express interface to the birds by pushing push updated information to the customer. Push interface is implemented by the user in accordance with the rules of courier birds. Businesses open interfaces, birds timed delivery of the latest push to track the logistics business platform.

Advantages: customers do not need to track changes in attention, if there is updated automatically pushed courier birds.

Cons: server performance customers have requested, courier birds timed request interface, server customers have a certain impact, abnormal client server will not receive the latest data. Express birds push the interface depending on the business, will push different data according to the classification RequestType, the user needs to push data classification save. The interface without having to change the original push, push courier birds will be based on the push version.

  1. Interface rules

(1), client-server must be stable and have some ability to accept data (required to express the birds return in the successful example of 5S, push-out will determine the failure). Express birds push logistics information to customers through a multi-threaded.

(2), customers need to develop interfaces required by courier birds, to ensure the normal receiving information. After the customer access data storage and immediately returns the received response. If the customer processes the data, and then respond. This will cause a network timeout, low transmission efficiency. (3), when the active push information stream received by the client interface provides the interface must be implemented in accordance with the express requirement bird.

(4), providing customers with an interface address, user login management background debug platform ----- ----- --- push interface test (after a successful return to the example) can only be configured.

(5), the interface supports only Json data format.

(6), POST method request.

Example:

//快递鸟请求接收接口示例<br>订阅查询结果示例:
{
    "EBusinessID": "1109259",
    "Count": "2",
    "PushTime": "2015-03-11 16:21:06",
    "Data": [
        {
            "EBusinessID": "1109259",
            "OrderCode": "",
            "ShipperCode": "EMS",
            "LogisticCode": "5042260908504",
            "Success": true,
            "Reason": "",
            "State": "2",
            "CallBack": "0",
            "Traces": [
                {
                    "AcceptTime": "2015-03-06 21:16:58",
                    "AcceptStation": "深圳市横岗速递营销部已收件,(揽投员姓名:钟定基;联系电话:)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-07 14:25:00",
                    "AcceptStation": "离开深圳市 发往广州市",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-08 00:17:00",
                    "AcceptStation": "到达广东速递物流公司广航中心处理中心(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-08 01:15:00",
                    "AcceptStation": "离开广州市 发往北京市(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-09 09:01:00",
                    "AcceptStation": "到达北京黄村转运站处理中心(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-09 18:39:00",
                    "AcceptStation": "离开北京市 发往呼和浩特市(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-10 18:06:00",
                    "AcceptStation": "到达  呼和浩特市 处理中心",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-11 09:53:48",
                    "AcceptStation": "呼和浩特市邮政速递物流分公司金川揽投部安排投递(投递员姓名:安长虹;联系电话:18047140142)",
                    "Remark": ""
                }
            ]
        },
        {
            "EBusinessID": "1109259",
            "OrderCode": "",
            "ShipperCode": "EMS",
            "LogisticCode": "5042260943004",
            "Success": true,
            "Reason": "",
            "State": "2",
            "CallBack": "0",
            "Traces": [
                {
                    "AcceptTime": "2015-03-07 15:26:09",
                    "AcceptStation": "深圳市横岗速递营销部已收件,(揽投员姓名:周宏彪;联系电话:13689537568)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-08 16:32:00",
                    "AcceptStation": "离开深圳市 发往广州市",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-09 00:58:00",
                    "AcceptStation": "到达广东速递物流公司广航中心处理中心(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-09 01:15:00",
                    "AcceptStation": "离开广州市 发往北京市(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-10 05:20:00",
                    "AcceptStation": "到达北京黄村转运站处理中心(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-10 11:59:00",
                    "AcceptStation": "离开北京市 发往廊坊市(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-10 14:23:00",
                    "AcceptStation": "到达廊坊市处理中心(经转)",
                    "Remark": ""
                },
                {
                    "AcceptTime": "2015-03-11 08:55:00",
                    "AcceptStation": "离开廊坊市 发往保定市(经转)",
                    "Remark": ""
                }
            ]
        }
    ]
}

货款状态:
{
    "EBusinessID": "1109259",
    "Count": "2",
    "PushTime": "2015/3/11 16:21:06",
    "Data": [
        {
            "EBusinessID": "1109259",
            "OrderCode": "",
            "ShipperCode": "EMS",
            "LogisticCode": "5042260908504",
            "Success": true,
            "Reason": "",
            "State": "2",
            "CallBack": "0",
            "OrderState":"1",
            "AccountName":"张三",
            "AccountTel":"13800000000",
            "AccountNum":"0321"
        },
        {
            "EBusinessID": "1109259",
            "OrderCode": "",
            "ShipperCode": "EMS",
            "LogisticCode": "5042260908522",
            "Success": true,
            "Reason": "",
            "State": "2",
            "CallBack": "0",
            "OrderState":"1",
            "AccountName":"张三",
            "AccountTel":"13800000011",
            "AccountNum":"0321"
        }
    ]
}

Guess you like

Origin blog.51cto.com/14466758/2431096