How to use the interface provided by express bird to query the logistics track of daily express.
Let’s take a look at the actual display effect after the interface is completed
The following is a screenshot of the product application and the track information obtained by calling the express bird interface:
In fact, the message information returned by express bird will be more detailed, and the information displayed to customers can be packaged according to product needs.
Now let’s talk about how to achieve it!
First of all, we have the resources we need,
Test merchant ID:
test1617571
Test API key:
554343b2-7252-439b-b4eb-1af42c8f2175 (this key is only used in test environment)
API test address:
http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
Next, let’s talk about request parameters
1、 Interface description / description
Description of request system level parameters:
remarks:R-required, o-optional, and the parameter in c-message is optional under certain conditions
The system level parameters mentioned here are equivalent to public parameters. These parameters must be passed to each interface when calling.
Interface parameters:
Interface parameters, also known as business parameters, request different business interfaces, parameter fields, content is also different, is with the business change, here we implement the instant query interface, request instruction type: 1002, express bird official website requires that the express company code and logistics order number must be passed, and the Daily Express code is hhtt
To view the codes of other express companies, click this link:
http://www.kdniao.com/documents
We use daily express bill No. 669537622442 to complete the track query,
Request JSON
{‘OrderCode’:”,’ShipperCode’:’HHTT’,’LogisticCode’:’669537622442′}
Complete message of request (after URL encoding)
RequestData=%0d%0a++++++++++++%7b%27OrderCode%27%3a%27%27%2c%27ShipperCode%27%3a%27HHTT%27%2c%27LogisticCode%27%3a%27669537622442%27%7d%0d%0a++++++++&EBusinessID=1264783&RequestType=1002&DataSign=M2ZmMzhhZGM3ZDM4NDUyYjJhYzYyNzFiMDA3MGZmOGY%3d&DataType=2
Uncoded request message:
RequestData={‘OrderCode’:”,’ShipperCode’:’HHTT’,’LogisticCode’:’669537622442′}&EBusinessID=1264783&RequestType=1002&DataSign=M2ZmMzhhZGM3ZDM4NDUyYjJhYzYyNzFiMDA3MGZmOGY=&DataType=2
Return message information
{
"LogisticCode": "669537622442",
"ShipperCode": "HHTT",
"Traces": [
{
"Acceptstation": "[received] [Lanshan No.1 Branch, Linyi 0539-7970100]",
"AcceptTime": "2018-12-27 10:33:39"
},
{
"Acceptstation": "[arrival] express arrives at [Linyi distribution center]",
"AcceptTime": "2018-12-27 12:10:35"
},
{
"Acceptstation": "[dispatch] express is sent from [Linyi distribution center] to [Qufu distribution center]",
"AcceptTime": "2018-12-27 12:13:12"
},
{
"Acceptstation": "[arrival] express arrives at [Qufu distribution center]",
"AcceptTime": "2018-12-27 18:20:47"
},
{
"Acceptstation": "[dispatch] express is sent from [Qufu distribution center] to [Wuhan distribution center]",
"AcceptTime": "2018-12-27 18:22:06"
},
{
"Acceptstation": "[arrival] express arrives at [Wuhan distribution center]",
"AcceptTime": "2018-12-28 09:19:59"
},
{
"Acceptstation": "[arrival] express arrives at [Wuhan distribution center]",
"AcceptTime": "2018-12-28 09:20:09"
},
{
"Acceptstation": "[dispatch] express is sent from [Wuhan distribution center] to [Changsha distribution center]",
"AcceptTime": "2018-12-28 09:24:23"
},
{
"Acceptstation": "[arrival] express arrives at [Changsha distribution center]",
"AcceptTime": "2018-12-28 19:42:05"
},
{
"Acceptstation": "[dispatch] express is sent from [Changsha distribution center] to [Hengyang distribution center]",
"AcceptTime": "2018-12-28 19:48:42"
},
{
"Acceptstation": "[arrival] express arrives at [Hengyang distribution center]",
"AcceptTime": "2018-12-29 02:43:31"
},
{
"Acceptstation": "[sending] express is sent from [Hengyang distribution center] to [Chenzhou]",
"AcceptTime": "2018-12-29 02:46:06"
},
{
"Acceptstation": "[arrival] express arrives at [Chenzhou 18670529177]",
"AcceptTime": "2018-12-29 08:54:42"
},
{
"Acceptstation": "[sending] express is sent from [Chenzhou 18670529177] to [Xianglu Road branch of Chenzhou]",
"AcceptTime": "2018-12-29 08:55:42"
},
{
"Acceptstation": "[arrival] express arrives at [Xianglu Road branch of Chenzhou]",
"AcceptTime": "2018-12-29 10:38:56"
},
{
"Acceptstation": "Huang Bo 131703547583170354758 of [dispatch] Xianglu Road branch of Chenzhou is sending out pieces",
"AcceptTime": "2018-12-29 14:37:25"
},
{
Please contact [15115514458] / [Chenzhou Xianglu Road branch] or call the headquarters service hotline 4001888888 if you have any questions! Every day express brother sincerely invite you to give a five-star high praise, thank you! "
"AcceptTime": "2018-12-29 21:17:56"
}
],
"State": "3",
"EBusinessID": "1264783",
"Success": true
}
Here according to our actual business needs to choose free package or charge package.
The detailed interface document is attached to you:
http://www.kdniao.com/documents