Bird Express Global Logistics single query interfaces api

Bird Express Global Logistics single query API interface designed to provide electricity supplier, electricity supplier platform, logistics tool, to play a single tool, storage systems, mobile APP systems provide a professional, stable, high-quality service API interface, to meet the different users of logistics management demand. This document is described in detail on the various API interface, user-friendly and fast docking birds using courier services.
Bird Express Global Logistics single query interfaces api

Bird collection of the world's 418 Express courier logistics systems, packaged into a unified standard interface, providing logistics and express a single user to have a system of electricity supplier warehouse, ERP systems, electronic business platform, cross-border electricity supplier, warehouse (WMS), applets, etc. No query interface solution that supports high concurrency, support for multi-express interface stability and timeliness are guaranteed.

So far, there have been major businesses, business platform, warehousing, customs clearance companies, ERP, WMS, TMS, CRM, cabinets and other express at least one hundred thousand birds express shipper using API docking solutions, including delivery management, Holiday logistics, electronics face alone, goods in transit monitoring, payment and finance the whole process of logistics services. The other end logistics services side there are more than 400 global logistics and express courier company to complete the interface, docking birds. Electronic business platform mushrooms street, a lot of fight, the United States, Netease is connected koala birds Express interface, there are many ISV service providers (such as shop steward, business school, E shop treasure) also express docking birds API interface.

[Electricity supplier courier single query scene needs Description
There are a lot of electronic business platform and ISV business demand for logistics api interface, today we are the main share is docked Guide Express birds Express query interface of a single number, express a single query interface docking there are many scenarios, will encounter a lot of scenes, the most important is the electricity supplier site users to call this API to display the details of logistics information open "my orders", the electricity supplier back-end logistics management system, all customer service inquiries waybill before reconciliation the sign states, and tracing, electronic business platform for the logistics business management and control requirements must embrace the pieces must be sent to see how long the express condition, to see how long the goods receipt must be received by the state, according to these states to improve management and control of business users overall satisfaction. The figure is the electronic business platform, buyers, orders shipped flowchart businesses.

[Express single query interface, docking using procedure]
1, transmits express a single number and courier companies encoded to express the bird
2, express birds query to stream on-track state in accordance with a single number and courier companies
3, express birds query to stream on-track state feedback to the electronic business platform ISV or service provider
4, electronic business platform ISV or service provider receives the data and do real-time processing or data presentation applications

[Express a single query interface description explains]
(1) supports a query interface according Tracking Number (single query).
(2) express a single number to specify the interface of Express encoding format will not return an error or failure information is encoded.
Such as: EMS single stream number should be selected coding Express (EMS) Express view coding
(3) tracking information returned stream are arranged in ascending order of time occurrence.
(4) 1002 interface commands.
(5) the interface to support message receiving mode HTTP POST, the request method of encoding format (utf-8): "application / x-www-form-urlencoded; charset = utf-8".
(6) Test Address: http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
(. 7) official Address: http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
request system-wide parameters Description:

NOTE: R- required (Required), O- optional (Optional), C- packets are optional (the Conditional) under certain conditions
[Interface Parameters
requested content field definition:

Return parameter definitions:

Express a single query interface [example]

没有物流轨迹的
{
"EBusinessID": "1109259",
"Traces": [],
"OrderCode": "",
"ShipperCode": "SF",
"LogisticCode": "118461988807",
"Success": false,
"Reason": null
}
有物流轨迹的
{
"EBusinessID": "1109259",
"OrderCode": "",
"ShipperCode": "SF",
"LogisticCode": "118461988807",
"Success": true,
"State": 3,
"Reason": null,
"Traces": [
{
"AcceptTime": "2014/06/25 08:05:37",
"AcceptStation ":" I am sending pieces .. (sending pieces of person: Deng Yufu, Tel: 18718866310) [Shenzhen] ", "AcceptStation": "express distribution center in Shenzhen, ready for delivery next Shenzhen [Shenzhen]"" AcceptTime ":" 2014/06/25 04:01:28 " ,{},
" Remark, the ": null




"Remark, the": null
},
{
"AcceptTime": "2014/06/25 01:41:06",
"AcceptStation": "Express distribution center in Shenzhen [Shenzhen]",
"Remark, the": null
},
{
" AcceptTime ":" 2014/06/24 20:18:58 ",
" AcceptStation ":" I have been recipient [Shenzhen] ",
" Remark, the ": null
},
{
" AcceptTime ":" 2014/06/24 20: 55:28 ",
" AcceptStation ":" express in Shenzhen, the Shenzhen distribution center ready for delivery next [Shenzhen] ",
" Remark, the ": null
},
{
" AcceptTime ":" 2014/06/25 10:23 : 03 ",
" AcceptStation ":" sending pieces have been received [Shenzhen] ",
" Remark, the ": null
},
{
"AcceptTime": "2014/06/25 10:23:03",
"AcceptStation": "the person who signed is: have been received [Shenzhen]",
"Remark, the": null
}
]
}

[Process] access

Bird express a single number for automatic identification interface (API) access video tutorial
express birds single query interface (API) access to video tutorial

Login courier official website registration page Bird Bird registration Express account
login courier birds user management background
Note: obtain a user ID and APIKey corresponding to each demo in EBusinessID, AppKey login courier birds user management background.
Tips: What EBusinessID with APIKey that? EBusinessID with APIKey your courier distribution of birds in the bird after the courier website registration key (corresponding to the official website user ID and API key), to ensure the reliability of the source application, to avoid the application of forgery, used by criminals.
3. Go to "My Member" real-name authentication

3.1, authentication type, application type can be selected according to the actual situation, the interface returns the data independent of the selection result;
3.2 marked * are required, requires upload clear, jpg image format and less than 2M of documents;
3.3, docking technology Intelligence is information the user side docking engineer;
3.4, any additional questions can be added into the official website of the courier birds right of the QQ group for consultation.
4. After successful authentication, enter the "Services Management", subscribe to a membership service

4.1 Logistics inquiry (free version) membership package for the free edition, after the expiration of one year, as there is data exchange system will be automatically renewed for free in the last 3 months;
4.2, any additional questions can be added into the official website of the Business Cooperation group (group number: 616 310 430) for advice.
5. Development docking
5.1, real-time query (RequestType: 1002/8001) the number of daily queries <= 3000 docking instant query interface
5.1.1, you need real-name authentication prior request interface, subscribe to a membership service, otherwise it will fail and return prompt request "not subscribe Interface";
5.1.2, available for download interface development, "courier birds Interface technical documentation" in reference; hoc queries, refer to section 4.1 or 5.1.1 technical documentation;
5.1.3, interface development can download the "instant queries demo "be referenced (only the .NET, Java, PHP three languages Demo);
5.1.4, see the corresponding express courier bird coding can download the" 2018 Bird express interface support express coded list .xlsx ".
5.1.5, access procedure in case of doubt, please refer to the official website of the courier birds to resolve common problems, you can also enter the official website of the courier birds join docking technology group for consultation.
5.2, logistics tracking (RequestType: 1008/8008) May the number of queries> 3000 docking logistics tracking interfaces
5.2.1, you need real-name authentication prior request interface, subscribe to a membership service, otherwise it will fail the request and returns the prompt "not subscribe Interface ";
5.2.2, interface development need to download the" Bird express Interface technical documentation "view; logistics tracking, refer to section 4.2 or 5.1.2 technical documentation;
5.2.3, developed subscribe interfaces:
5.2.3.1, you can download" logistics tracking demo "be referenced (only the .NET, Java, demo PHP three languages),
other languages develop based on user needs to develop their own technical documentation;
5.2.3.2, subscribe to test the interface, the control returns the correct technical documentation on behalf of subscribers interface, docking is successful, details visible technical documentation.
5.2.4, developers push the interface:
5.2.4.1, provides no demo will be pushed requestType, requestData and DataSign three parameters push, you push a development interface to receive these three parameters on the line, after the successful reception of the need to express in the 5S birds return to
work received data packets, otherwise a timeout. RequestData contains application-level parameters, stream trajectory (details see technical documentation);
5.2.4.2, debugging platform in the sandbox (sandbox debugging platform Address: http://kdniao.com/UserCenter/v2/SandBox/PushQueryParam.aspx ) callback address to configure, test push interface. User-supplied callback address ,
for receiving the push of birds express logistics information, as long as the line outside the network can access. Testing, configuration steps are as follows:
A, fill in the callback address:

b, click [generate] the application level parameters message (RequestData) is pushed to test the logistics on the user's first step when filling callback address information.
After c, click [calling], the user receives logistics information tests, users need to return successfully received signal to the courier birds at the application level parameters message area (Note: do not there is a space between the fields, space will affect the return results),
return format: { "EBusinessID": "1237100 ", "UpdateTime": "2015-03-11 16:26:11", "Success": true, "Reason": ""}

d, Results are shown as call request after a successful push to develop user interfaces tested.
e, after testing by the first step back to fill in the callback address location Click [Configuration], pop bomb box, fill in the phone number (must be a registered courier birds account phone number), authentication code,
callback address, click [Save] Configuration success in a formal environment to use, next time you need to modify the address of a callback with the initial configuration steps consistent callback address.

5.2.5, subscribe interfaces, the interfaces are pushing the test is successful, you can use a formal address to subscribe true express orders, express the birds usually push logistics information within 12 hours you have to configure on a good callback address;
5.2.6, interface development view corresponding to the courier company courier bird coding can download the "2019 Bird express interface support express coded list .xlsx";
5.2.7, access procedure in case of doubt, please refer to the official website of the courier birds common questions resolved, you can also enter the official website of the courier birds join docking technology group for consultation.

You may also be concerned about the problem [of]
1, problem: Express Interface birds have concurrent requirement?
Express birds concurrent real-time query interface does not exceed 10 times / sec, logistics tracking interface to subscribe to no more than 30 times / sec, under a single interface to a single electronic face no more than 20 times / sec.
2, problem: Express birds api charges what is?
Express birds query interface and a single electronic surface interfaces are provided free of charge, if your state of data timeliness and service have special needs, contact the courier birds staff, tailored to your proprietary solutions, the specific charges will It is agreed according to your needs.
3, problem: real-time data updates birds express how?
Instant query interface: real-time access consistent with the current trajectory of the latest information, data and information on the official website.
Logistics Tracking Interface: Express birds every two hours to courier companies to obtain the track, if you subscribe to a single number does not track updates, again after an interval of two hours to courier companies to obtain the track, followed by cycle until the logistics track update, after obtaining the new trajectory push queuing sequence.
4, issue: Express birds accuracy of the data, the state logistics would not exist the problem of inaccurate?
Track information accuracy greater than 99.9%. Stream path information consistent with the courier company official website, occasionally inconsistent with the interface data provided by the official website of the courier company, the inconsistency is less than 0.1%.
5, question: Bird express and logistics tracking real-time query interface Interface What is the difference?
(1) access is not the same:
real-time query interface, real-time query information based on the trajectory of logistics and courier express a single number coding.
Logistics tracking interface, users subscribe to express numbers, express the birds will be timed push new logistics information.
(2) implement different functions:
real-time query interface, a single query can only request a single logistics information, support 10 / S of concurrent requests.
Logistics tracking interfaces, subscribe to a push model to obtain trace information, to launch a subscription, delivery will continue to monitor the birds push updated track information until the sign.
(3) the amount of a single query is not the same:
real-time query the number of queries per day <= 3000, logistics tracking does not limit the amount of subscription form, and have updated information for each single number.
6, Q: Bird express logistics tracking the timeliness of data What?
After receiving the new single delivery, immediately added to monitor queue, then returns the outcome instantly, there is no result, waits a predetermined time (e.g. 2 hours) once again performed under monitoring. For these follow-up monitoring, if a waybill number Express official website of the corresponding result B, B-date a state corresponding to the time is T1, the express A bird B pushes your time is T2, then | T2-T1 | generally less than 0-2 to 4 hours, but we will continue to be pushed to your side, so that the state of the consignment can be continuously updated.
7, problem: Bird express logistics tracking is the need to develop our own receiving interface is not it?
Docking logistics tracking interfaces, you need to develop an interface to subscribe (subscription and single number encoded to the courier express company birds. There subscribe interface .net, php and java version of the demo, you can refer to. There are a push to develop their own interfaces (reception Bird push courier logistics track), developed after login courier birds sandbox background debug interface to push, after the successful commissioning can be self-configured interface to push back in the sandbox.
8, issue: push Interface express logistics tracking of how the birds do?
push Interface for receiving push logistics information, push the interface we call your interface, you only need to receive parameters, configure your callback address in the sandbox back on the line, RequestData contains application-level parameters, stream track, will push when push requestType, requestData and DataSign three parameters (details see technical documentation), you develop a push interface to receive these three parameters on the line.
9, issue: Bird express logistics tracking API to achieve what principle?
Subscribe to the interface works: users will subscribe to express a single number to us, we immediately went to join the queue logistics company official interface to query, there are tracks give users push. If the data will go two hours without re-updated logistics company official query interfaces, new data will be pushed to the user the full amount of data, if the data is not updated two hours and then repeat the action until the receipt of the consignment.
10, question: Bird express courier logistics company which supports query interface?
Bird express express logistics company to support 418 interfaces, in particular birds courier official website to download "2019 Bird Express interface support Express coding .xlsx" view.

Interface specification 1

1.1 Interface Specification and Description

1.1.1 packet and message encoding

Packet formats: Json format

The method of encoding format request (utf-8): "application / x-www-form-urlencoded; charset = utf-8"

Agreement on a unified interaction with UTF-8, to avoid data transfer Chinese garbled.

1.1.2 Interface packet structure

Legend - pack structure (system-level data {})

1.1.3 JSON example

string used = "1237100"; // ID of example only, not for the actual use
// private key encryption, by courier birds
string keyValue = "56da2cf8-c8a2-44b2- b6fa-476cd7d1ba17"; // example only Key , not for practical use
// request address
String URL = " http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx ";
// 2-JSON
String the DataType = "2";
// character coding using UTF- . 8
string charset = "UTF-. 8";
// the JSON string string
string jsonStr = "{\" OrderCode \ ": \" \ ", \" ShipperCode \ ": \" SF \ ", \" LogisticCode \ ": \ "118461988807 \"} ";
// the (jsonStr + aPIKey) for MD5 encryption, then Base64 encoding, finally URL (utf-8) encoding
datasign = HttpUtility.UrlEncode (base64 (MD5 ( jsonStr + keyValue," UTF- 8 ")," UTF-8 "), Encoding.UTF8);
// request packet parameters
postStr = String "= 1002 & EBusinessID the RequestType = Used = & jsonStr the RequestData & DataSign the DataType = & datasign the DataType =";
// protocol communication protocol Http request Post embodiment
String = this.DoPost POST (URL, postStr);
1.1.4 system-wide parameters

* All express this unified interface system level parameters, different interfaces depending on the access request interface commands.

1.1.5 schematic flow

1.1.6 Definitions

We must ask

Explanation

R

Required (Required).

O

Optional (Optional)

C

Optionally (the Conditional) under certain conditions

1.2 Signature Description

1.2.1 About signatures

Bird Express and third-party e-commerce company for docking systems, there is a certain security mechanisms. Docking using IP authentication signature-added way, specific programs are as follows:

1. To prevent data from being tampered

5 to be passed (R) in the POST request parameter

RequestData == content data (URL encoding: UTF-8)

EBusinessID == User ID

RequestType = request command type

DataSign == signature data content of: (requested content (uncoded) + ApiKey) for MD5 encrypted and then Base64 encoding, finally URL (utf-8) encoding

DataType == 2 (return data type is json)

Note:

After DataSign generating, after receiving the other data, the same signature algorithm (101/102 push the interface is not required RequestType URL encoding), a digest, a summary comparison of both are the same, if different, then the transfer process occurs data tampering.

2. Call authentication interface

After users register as a courier birds, it will generate the corresponding user ID and APIKey, user ID corresponds to the user name, APIKey as a password.

For example:

1. Assuming

RequestData (JSON) reads:

{ "Order Code", "", "ShipperCode ':' SF ',' LogisticCode ',' 118954907573 '}

After the content URL (UTF-8) encoded as follows:

% 7b% 27OrderCode% 27% 3a% 27% 27% 2c% 27ShipperCode% 27% 3a% 27SF% 27% 2c% 27LogisticCode% 27% 3a% 27118954907573% 27% 7d;

EBusinessID = 1237100 [Example ID, not for practical use]

APIKey = 56da2cf8-c8a2-44b2-b6fa-476cd7d1ba17 [Example Key, not for practical use]

2. The signature is then content DataSign

{'OrderCode':'','ShipperCode':'SF','LogisticCode':'118954907573'}56da2cf8-c8a2-44b2-b6fa-476cd7d1ba17

After base64 md5 content and post it to: OWFhM2I5N2ViM2U2MGRkMjc4YzU2NmVlZWI3ZDk0MmE =,

After the content URL (UTF-8) encoding for: OWFhM2I5N2ViM2U2MGRkMjc4YzU2NmVlZWI3ZDk0MmE% 3d

The final data to be sent to:

RequestType=1002&EBusinessID=1237100&RequestData =%7b%27OrderCode%27%3a%27%27%2c%27ShipperCode%27%3a%27SF%27%2c%27LogisticCode%27%3a%27118954907573%27%7d&DataSign=OWFhM2I5N2ViM2U2MGRkMjc4YzU2NmVlZWI3ZDk0MmE%3d&DataType=2

3. Upon receipt of the data receiver, to obtain

EBusinessID and RequestData and DataSign these and other data.

4. The recipient EBusinessID obtained APIKey, RequestData + APIKey of data

md5 and base64 content after it is

OWFhM2I5N2ViM2U2MGRkMjc4YzU2NmVlZWI3ZDk0MmE=

Whether the data transfer with the signature over the recipient 5. DataSign consistent determination, if the same business operations, and if not an error is returned.

1.2.2 (C #) DataSign signature encryption codes

/// <the Summary>
/// electricity supplier Sign Signature
/// </ the Summary>
</ param> /// <param name = "Content"> Content
/// <param name = "keyValue" > APIkey </ param>
/// <param name = "charset"> the URL encoding </ param>
/// <Returns> DataSign signature </ Returns>
Public Encrypt String (String Content, the keyValue String, String charset)
{
IF (the keyValue! = null)
{
return Base64 (MD5 (the keyValue + Content, charset), charset);
}
return Base64 (MD5 (Content, charset), charset);
}
/// <Summary>
/// MD5 encryption string
/// < / Summary>
/// <param name = "the text"> be encrypted string </ param>
/// <Returns> ciphertext </ returns>
Private string MD5(string Text, string charset)
{
byte[] buffer = System.Text.Encoding.GetEncoding(charset).GetBytes(Text);
try
{
System.Security.Cryptography.MD5CryptoServiceProvider check;
check = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] somme = check.ComputeHash(buffer);
string ret = "";
foreach (byte a in somme)
{
if (a < 16)
ret += "0" + a.ToString("X");
else
ret += a.ToString("X");
}
return ret.ToLower();
}
catch
{
throw;
}
}
Private static string base64(String str, String charset)
{
returnConvert.ToBase64String(System.Text.Encoding.GetEncoding(charset).GetBytes(str));
}
1.3 Step Access

1. Express birds become official website registered account Express birds user;

User ID Express is a bird call interface provided by the service identification can not be changed, can not be diverted, API Key is an additional key signature application access API must be properly preserved. Relationship between the two is similar to a username and password, both of which use signatures and operational parameters.

Login official website at:

http://www.kdniao.com/

Official website registration website:

http://www.kdniao.com/reg

Interface Introduction official website at:

http://www.kdniao.com/api-all

2. login background, conduct real-name authentication, and the opening of membership services;

3. According to the development of technical documentation and debugging platform testing the FBI;

Bird Express provides various API interfaces DEMO (including: .Net version, Java version, PHP version) for the development of reference.

DEMO Download: http://www.kdniao.com/documents-demo

4. The system on-line publishing.

Note: The test environment to obtain test express a single number is not available for the actual delivery.

Guess you like

Origin blog.51cto.com/14508907/2430988