快递物流信息接口API,用什么好?我要调用第三方的API来显示数据,做快递信息查询

WBOY
Release: 2016-06-06 20:06:44
Original
1324 people have browsed it

要做快递信息展示,比如已下单 已发货,货物到哪了,这样的信息显示,如何调用快递公司的API?想用顺丰快递的,看开发手册好复杂,看不读懂,谁知道怎么用?

回复内容:

要做快递信息展示,比如已下单 已发货,货物到哪了,这样的信息显示,如何调用快递公司的API?想用顺丰快递的,看开发手册好复杂,看不读懂,谁知道怎么用?

聚合数据和百度API 都还可以,有些收费,有免费试用

参考:快递鸟

我们用了kuaidi100的免费接口。http://www.kuaidi100.com/

https://www.juhe.cn/docs/api/id/43 可以看下聚合数据的 比较专业

转自之前回答过的一个问题:https://segmentfault.com/q/1010000005360416/a-1020000005369082

可以用快递鸟的API,给你一份Java的DEMO:https://github.com/wucao/common-api

快递鸟官方网站:http://www.kdniao.com/

接口文档:http://www.kdniao.com/YundanChaxunAPI.aspx

免费使用,每天不超过3000次,需要注册后才可以使用。快递公司编码:http://www.kdniao.com/file/ExpressCode.xls

使用:

<code>KdniaoService kdniaoService = new KdniaoService();
kdniaoService.setApiId("API ID"); // API ID(商户ID)
kdniaoService.setApiKey("API Key"); // API Key
List<kdniaotrace> list = kdniaoService.getTrace("YTO", "700192858115"); // 快递公司编码、快递单号
for(KdniaoTrace trace : list) {
    System.out.println(trace.getTime() + " | " + trace.getMessage());
}</kdniaotrace></code>
Copy after login

输出:

<code>2016-05-24 19:15:08 | 【广东省广州市白云区罗冲围公司】 取件人: 张定 已收件
2016-05-24 20:15:35 | 【广东省广州市白云区罗冲围公司】 已收件
2016-05-24 23:07:52 | 【广州转运中心】 已收入
2016-05-24 23:13:35 | 【广州转运中心】 已发出 下一站 【上海转运中心】
2016-05-26 02:18:40 | 【上海转运中心】 已收入
2016-05-26 04:33:15 | 【上海转运中心】 已发出 下一站 【上海市闵行区虹桥公司】
2016-05-26 07:37:59 | 【上海市闵行区虹桥公司】 已收入
2016-05-26 07:38:03 | 【上海市闵行区虹桥公司】 派件人: 朱照耀 派件中 派件员电话18321539302
2016-05-26 11:55:09 | 客户 签收人: 邮件收发章 已签收 感谢使用圆通速递,期待再次为您服务</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!