This interface uses the aggregated data interface: www.juhe.cn/docs/api/id…
1: Application scenario: Query logistics information
2: registration account, application key
3: view interface parameters
4: Demo code
<! -- Jquery is guaranteed to be 1.12 and above --> <script SRC =". / jquery - 1.12.4. Js. ""></script>
<script>
var $key = "870967b6f718e99ceda764f1829c1763"; // Apply merchant ID var$kdNumber = "3383748328872"; // Express tracking number var$com = "sto"; $. Get ({url:'http://v.juhe.cn/exp/index',
data:{
key : $key,
com : $com,
no : $kdNumber
},
dataType:"jsonp",
success:function(data){ console.log(data); }}); </script>Copy the code
4.1: Set JSONP across domains
Ajax access using JQuery (test directly access cannot get data, because the server has not actively set open CROS resource sharing) browser defaults to the same origin policy, so access failed. DataType = “jSONP” is required for cross-domain access.
4.2: Returned logistics information
5: Other express companies
To see which express company queries are supported by aggregated data: www.juhe.cn/box/index/i…