First, real-time express query interface

1.1 Request Address

https://poll.kuaidi100.com/poll/query.do

1.2 Request Types

post

1.3 Input Parameters

Request parameters (header)

The name of the type The default value
Content-Type string application/x-www-form-urlencoded

Request Parameters (Body)

The name of the type If necessary The sample value describe
customer String is Authorization code, pleaseApply for enterprise EditionTo obtain
sign String is The signature is used to authenticate the identity. MD5 encryption is performed in the sequence of Param + key + Customer (the encrypted string must be in 32-bit uppercase letters) and the + sign is not required
Θ param Object is Concatenated by other fields
└ com string is yuantong Query the express company code, all use lowercase lettersDownload Code Form
└ num string is 12345678 The number of the queried Courier order is a maximum of 32 characters
└ phone string no 13888888888 The telephone number of sender and receiver (mobile phone and fixed phone are acceptable, only one can be filled in. Sf single number is mandatory, and other express companies choose to fill in. If a landline number has an extension number, the extension number does not need to be uploaded.
└ the from string no Guangdong shenzhen City of departure
└ to string no Beijing chaoyang Destination city, the frequency of surveillance will be increased upon arrival
└ resultv2 int no 1 Add this field to enable the administrative region resolution function. 0: close (default). 1: enable the administrative region analysis function and logistics track to increase the logistics status value. 2: enable the administrative region analysis function and logistics track to increase the logistics status value and return the departure, destination and current city information
└ show String no 0 Format: 0: JSON (default), 1: XML, 2: HTML, 3: text
└ order String no desc Order of returned results :desc descending (default), ASC ascending

1.4 Example Request Parameters

    customer = **********
    sign = ******************
    param = {
        "com": "ems"."num": "em263999513jp"."phone": "13868688888"."from": Nanshan District, Shenzhen City, Guangdong Province."to": Chaoyang District, Beijing."resultv2": "1"."show": "0"."order": "desc"
    }
Copy the code

1.5 Result

The field names type Field meaning
message String Message body, please ignore
state Integer The current status of the express bill includes 13 states, including 0 in transit, 1 Receiving, 2 difficult, 3 receiving, 4 signing back, 5 sending, 6 returning, 7 forwarding, 10 waiting for customs clearance, 11 in customs clearance, 12 cleared, 13 abnormal customs clearance, 14 recipient rejection and so on
status Integer Communication status, please ignore
condition String Express order details status mark, not implemented yet, please ignore
ischeck Integer Please ignore whether to sign the label, and refer to the state field for details
com String Express company code, all lowercase letters
nu String Order no.
Θ data data Latest query result, array, contains multiple, full, reverse order (that is, the latest in the first), each item is an object, the object contains fields please expand
└ context String content
└ time String Time, raw format
└ ftime String Time after formatting
└ status String The signature status of this data element will appear only after the Resultv2 mark is submitted in the real-time query interface
└ areaCode String The code of the administrative area corresponding to this data element will appear only after the Resultv2 mark is submitted in the real-time query interface
└ areaName String The name of the administrative region corresponding to this data element will appear only after the Resultv2 tag is submitted in the real-time query interface

1.6 Service description of waybill signing status

The status value The name of the meaning
0 In transit The express is in transit
1 LanShou The express has been collected by the express company
2 difficult Express 100 cannot resolve a state, or a state that requires human intervention, such as the recipient’s wrong phone number.
3 Sign after receiving STH Normal sign for it
4 Back to sign The goods are returned to the consignor for signature
5 To send a The goods are being dispatched
6 Back to the The goods are on their way back to the shipper
7 Switch to Transfer the goods to another express company
10 For customs clearance The goods await customs clearance
11 The guanzhong qing The goods are in the process of customs clearance
12 Have customs clearance The goods have completed the customs clearance process
13 Abnormal clearance The goods are abnormal in the customs clearance process
14 A visa The recipient expressly refused to accept

1.7 Correct Example Is displayed

JSON format

{
    "message": "ok"."state": "0"."status": "200"."condition": "F00"."ischeck": "0"."com": "yuantong"."nu": "V030344422"."data":[
        {
            "context": "Shanghai Distribution Center/Loading and Loading scanning"."time": "The 2012-08-28 16:33:19"."ftime": "The 2012-08-28 16:33:19"}, {"context": "Shanghai Dial Centre/Disembarkation Scan"."time": "The 2012-08-27 23:22:42"."ftime": "The 2012-08-27 23:22:42",}}]Copy the code

1.8 Error Return Example

JSON format

{
    "result": false."returnCode": "400"."message": "Can't find the corresponding company."
}
Copy the code

1.8 Meaning of Information Code

Information code Information Description Causes and recommended handling methods
200 The query is successful The query is successful
400 The corresponding company could not be found If the submitted data is incomplete or the account is not loaded, check whether the submitted format is X-www-form-urlencoded POST format
500 If no result is found, try again Indicates that the query fails or no POST is submitted
501 Server error Sometimes, if the request is not submitted according to the standard, for example, the parameters of the express company are not filled in according to the document, etc., this error will also be reported
502 Busy server The server of Express 100 is disconnected or temporarily abnormal. Please contact Express 100 for troubleshooting
503 Failed to verify the signature Check the encryption mode. The sequence of param + key + Customer is encrypted by MD5. After the encryption, the string is uppercase
601 The key is expired There is no single unit available, the account needs to be recharged

Two, express company code

Download the form

Third, demo download

JAVA example CODE PHP example code PYTHON example code.net example code

First, real-time query API product introduction

Express 100 real-time query interface provides enterprises and end users with the function of real-time query of logistics trajectory.

After the user submits the tracking number to the real-time query interface, the interface will retrieve the tracking number information of the express company in real time and return the latest logistics information of the tracking number, including the logistics track, status, and time.

Real-time query API application scenarios

  1. In e-commerce web page /APP/ small program, customers can inquire the logistics track of purchased goods in order details;

  2. Customer service personnel to check the real-time trajectory of the order to ensure that the delivery status of goods is normal;

  3. Enterprises send gifts, documents, etc., business personnel according to the order number to track the delivery status, to ensure receipt;

  4. Can be integrated into the website, APP, ERP, SAAS platform, small program;

Because the express company system of bearing capacity is limited, so please do not mass, high frequency, repetitive calls this interface, only to end users such as your company website or APP active click to trigger call this interface to query, other state of the system automatically update waybill to sign for demand management class, please continue to use the express 100 information push service.

Note: For real-time query API, please control the frequency of each single query at least half an hour, otherwise it will cause a lock.

Third, real-time query API charging method

1. Charging method

The real-time query interface belongs to the query interface. After registering the express 100 account, enterprises can view and purchase the query interface package price in the enterprise management background.

2. Fees

Query interface precharge charging package: recharge can be opened and used without contract process.

The price/RMB Single amount Give/single The unit price/yuan
2000 20000 5000 0.08
1000 10000 2000 About 0.083
500 5000 500 About 0.09

Inquiry type interface charge on a single basis, a natural month for the same waybill for multiple inquiries only charge once.

3. Invoice

Express 100 supports issuing VAT invoices. After purchase, users can request invoice from the enterprise management background – expense center – payment record -. General electronic VAT invoice is issued by default, and special VAT invoice can be issued for more than 1000 yuan.

Official source:

Api.kuaidi100.com/document/5f…

Api.kuaidi100.com/document/5f…