>[info]### 請求方式 GET(php)
```php
$host = "http://www.kemanduo.net/v2/api/logistics/search"; //API接口地址
$appcode = 'XXXXXXX'; //替換成自己的appcode
$no = 'XXXXXXX';//物流單號
$type = 'XXXX';//物流公司編號
$headers = array();
array\_push($headers, "Authorization:APPCODE ".$appcode);
if (!empty($type)) {
$querys = "no=".$no."&type=".$type; //參數寫在這里
} else {
$querys = "no=".$no; //參數寫在這里
}
$url = $host . "?" . $querys; //url拼接
$curl = curl_init();
curl\_setopt($curl, CURLOPT\_CUSTOMREQUEST, $method);
curl\_setopt($curl, CURLOPT\_URL, $url);
curl\_setopt($curl, CURLOPT\_HTTPHEADER, $headers);
curl\_setopt($curl, CURLOPT\_FAILONERROR, false);
curl\_setopt($curl, CURLOPT\_RETURNTRANSFER, true);
curl\_setopt($curl, CURLOPT\_HEADER, false);
// curl\_setopt($curl, CURLOPT\_HEADER, true);// 如不輸出json, 請打開這行代碼,打印調試頭部狀態碼。
// 狀態碼: 200 正常;400 URL無效;401 appCode錯誤; 403 次數用完; 500 API網管錯誤
if (1 \== strpos("$" . $host, "https://")) {
curl\_setopt($curl, CURLOPT\_SSL\_VERIFYPEER, false);
curl\_setopt($curl, CURLOPT\_SSL\_VERIFYHOST, false);
}
$result \= curl\_exec($curl);//返回json字符串
```
>[warning]## **3.2返回參數**
>>[warning]3.2.1 參數示例(json字符串)
```php
{"number":"70007163899904","type":"HTKY","list":[{"time":"2019-08-01 23:10:55","status":"\u5ba2\u6237\u5df2\u53d6\u4ef6\uff0c\u63d0\u8d27\u70b9\uff1a\u3010\u767e\u4e16\u90bb\u91cc\u3011 \u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0817666558111 \u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff09"},{"time":"2019-08-01 16:33:30","status":"\u3010\u5e7f\u5dde\u5e02\u3011\u60a8\u7684\u6d3e\u4ef6\u5df2\u9001\u8fbe\u81f3\u3010\u3011\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0c\u8bf7\u5c3d\u5feb\u524d\u5f80\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\u9886\u53d6\u60a8\u7684\u5305\u88f9\uff0c\u8054\u7cfb\u7535\u8bdd:17666558111"},{"time":"2019-08-01 16:33:25","status":"\u6d3e\u4ef6\u9001\u8fbe\u3010\u767e\u4e16\u90bb\u91cc\u3011\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0c\u8bf7\u524d\u5f80\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\u9886\u53d6\u60a8\u7684\u5305\u88f9\uff0c\u8054\u7cfb\u7535\u8bdd\uff1a17666558111"},{"time":"2019-08-01 15:59:11","status":"\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011\uff0c\u3010\u5ed6\u6b23\/17666558111\u3011\u6b63\u5728\u6d3e\u4ef6"},{"time":"2019-08-01 15:58:11","status":"\u5230\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011"},{"time":"2019-08-01 14:01:35","status":"\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011\uff0c\u6b63\u53d1\u5f80\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011"},{"time":"2019-08-01 13:33:59","status":"\u5230\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-31 05:39:44","status":"\u5317\u4eac\u5e02\u3010\u5317\u4eac\u8f6c\u8fd0\u4e2d\u5fc3\u3011\uff0c\u6b63\u53d1\u5f80\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-31 03:46:51","status":"\u5230\u5317\u4eac\u5e02\u3010\u5317\u4eac\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-30 15:47:51","status":"\u5317\u4eac\u5e02\u3010\u91d1\u5b9d\u8857\u5206\u90e8\u3011\uff0c\u3010\u64cd\u4f5c\u90e8\/15313009609\u3011\u5df2\u63fd\u6536"}],"deliverystatus":"3","issign":"1","expName":"\u767e\u4e16\u5feb\u9012","expSite":"www.htky365.com ","expPhone":"95320","logo":"http:\/\/img3.fegine.com\/express\/htky.jpg","courier":"","courierPhone":""}
```
>[danger] 經json解密后
```php
{
"number":"70007163899904", //物流單號
"type":"HTKY", //物流公司編號
"list":\[ //物流詳細軌跡信息
????????{
????????????"time":"2019-08-01 23:10:55",
????????????"status":"客戶已取件,提貨點:【百世鄰里】 棠下街道棠東豐樂市場正后門百世快遞(17666558111 棠下街道棠東豐樂市場正后門百世快遞)"
????????},
????????{
????????????"time":"2019-08-01 16:33:30",
????????????"status":"【廣州市】您的派件已送達至【】棠下街道棠東豐樂市場正后門百世快遞,請盡快前往棠下街道棠東豐樂市場正后門百世快遞領取您的包裹,聯系電話:17666558111"
????????},
????????{
????????????"time":"2019-08-01 16:33:25",
????????????"status":"派件送達【百世鄰里】棠下街道棠東豐樂市場正后門百世快遞,請前往棠下街道棠東豐樂市場正后門百世快遞領取您的包裹,聯系電話:17666558111"
????????},
????????{
????????????"time":"2019-08-01 15:59:11",
????????????"status":"廣州市【廣州天河區七部】,【廖欣/17666558111】正在派件"
????????},
????????{
????????????"time":"2019-08-01 15:58:11",
????????????"status":"到廣州市【廣州天河區七部】"
????????},
????????{
????????????"time":"2019-08-01 14:01:35",
????????????"status":"廣州市【廣州黃埔轉運中心】,正發往【廣州天河區七部】"
????????},
????????{
????????????"time":"2019-08-01 13:33:59",
????????????"status":"到廣州市【廣州黃埔轉運中心】"
????????},
????????{
????????????"time":"2019-07-31 05:39:44",
????????????"status":"北京市【北京轉運中心】,正發往【廣州黃埔轉運中心】"
????????},
????????{
????????????"time":"2019-07-31 03:46:51",
????????????"status":"到北京市【北京轉運中心】"
????????},
????????{
????????????"time":"2019-07-30 15:47:51",
????????????"status":"北京市【金寶街分部】,【操作部/15313009609】已攬收"
????????}
????\],
"deliverystatus":"3", //狀態:0快遞攬件, 1在途中 ,2正在派送,3已簽收,4派送失敗
"issign":"1", //1是否簽收
"expName":"百世快遞", //快遞公司名稱
"expSite":"www.htky365.com ", //快遞公司官網
"expPhone":"95320",
"logo":"[http://img3.fegine.com/express/htky.jpg](http://img3.fegine.com/express/htky.jpg)",
"courier":"", //快遞員 沒有則為空
"courierPhone":"" //快遞員號碼 沒有則為空
}
```
## end