url:http://www.kuaidi100.com/query
拼接參數:
參數名稱 | 參數取值 | 參數類型 |
---|---|---|
type | 快遞碼,請參考快遞100碼 | String |
postid | 快遞單號 | String |
id | 未知,可為空 | String |
valicode | 未知,可為空 | String |
temp | 未知,可為空 | String |
url 示例:https://www.kuaidi100.com/query?type=yuantong&postid=2234014274&id=1&valicode=&temp=
(圓通
單號為2234014274
的快遞,不過快遞已經過期了,所以顯示不了信息,可以自行套用快遞單號)
請求方式:GET
json 示例:
{
"message": "ok",
"nu": "2234014274",
"ischeck": "1",
"condition": "F00",
"com": "yuantong",
"status": "200",
"state": "3",
"data": [
{
"time": "2016-11-26 19:10:30",
"ftime": "2016-11-26 19:10:30",
"context": "客戶 簽收人 : 本人簽收 已簽收 感謝使用圓通速遞,期待再次為您服務",
"location": null
},
{
"time": "2016-11-22 18:19:03",
"ftime": "2016-11-22 18:19:03",
"context": "派送不成功,政府機關、學校等特殊單位,正在安排處理中。",
"location": null
},
{
"time": "2016-11-22 14:20:50",
"ftime": "2016-11-22 14:20:50",
"context": "北京大學 已簽收",
"location": null
},
{
"time": "2016-11-22 10:33:25",
"ftime": "2016-11-22 10:33:25",
"context": "北京七道堰 已發出,下一站 北京大學",
"location": null
},
{
"time": "2016-11-22 10:27:47",
"ftime": "2016-11-22 10:27:47",
"context": "北京六和塔 已收入",
"location": null
},
{
"time": "2016-11-22 16:53:18",
"ftime": "2016-11-22 16:53:18",
"context": "浙江省五道口 已發出,下一站 北京轉運中心",
"location": null
},
{
"time": "2016-11-22 00:33:51",
"ftime": "2016-11-22 00:33:51",
"context": "浙江省四碼頭 已收入",
"location": null
},
{
"time": "2016-11-11 23:53:09",
"ftime": "2016-11-11 23:53:09",
"context": "浙江省三里屯 已發出,下一站 浙江省金華市義烏市",
"location": null
},
{
"time": "2016-11-11 20:04:10",
"ftime": "2016-11-11 20:04:10",
"context": "浙江省二畝地 已打包",
"location": null
},
{
"time": "2016-11-1 18:11:16",
"ftime": "2016-11-11 18:11:16",
"context": "浙江省一條街 已攬收",
"location": null
}
]
}
解析:
-
message
:ok
則表示沒有問題,否則攜帶錯誤信息 -
nu
:運單號 -
ischeck
:1
表示成功,0
表示錯誤 -
com
:快遞拼音 -
data
:具體到達的派送點,逆序 -
time
:到達時間 -
ftime
:到達時間 -
context
:到達地點具體信息 -
location
:到達地點,但取值一直為null