我是靠谱客的博主 疯狂酸奶,最近开发中收集的这篇文章主要介绍快递鸟物流查询轨迹地图API接口案例代码java,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

一、接口描述/说明

1.即时查询(轨迹地图版)接口

(1)查询接口支持按照运单号查询(单个/批量查询)。
(2)接口需要指定快递单号的快递公司编码,格式不对或则编码错误都会返失败的信息。
如:EMS物流单号应选择快递公司编码(EMS)查看快递公司编码
(3)返回的物流跟踪信息按照发生的时间升序排列。
(4)接口指令8003。
(5)接口支持的消息接收方式为HTTP POST,请求方法的编码格式(utf-8):"application/x-www-form-urlencoded;charset=utf-8"。
(6)接口地址: API测试地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
API正式地址:https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx

(7)免费试用快递鸟物流查询地图轨迹接口官网地址:http://www.kdniao.com/product-mapTrack1

 请求系统级参数说明:

2.快递查询(轨迹地图版)接口

(1)查询接口支持按照运单号查询(单个查询)。
(2)接口需要指定快递单号的快递公司编码,格式不对或则编码错误都会返失败的信息。
如:EMS物流单号应选择快递公司编码(EMS)查看快递公司编码
(3)返回的物流跟踪信息按照发生的时间升序排列。
(4)接口指令8004。
(5)接口支持的消息接收方式为HTTP POST,请求方法的编码格式(utf-8):"application/x-www-form-urlencoded;charset=utf-8"。
(6)接口地址: API测试地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
API正式地址:https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx

请求系统级参数说明:

3.订阅(轨迹地图版)接口

(1)此功能为专业定制,为特殊商户提供订阅服务,快递鸟系统会定时推送新的物流信息到商户系统。
(2)订阅快递号需指定相应的快递公司编码,格式不对或则编码错误都会返失败的信息。
如:EMS物流单号应选择快递公司编码(EMS)查看快递公司编码
(3)接口支持的消息接收方式为HTTP POST,请求方法的编码格式(utf-8):"application/x-www-form-urlencoded;charset=utf-8"。
(4)接口地址: API测试地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
API正式地址:https://api.kdniao.com/api/dist

请求系统级参数说明:

4.推送(轨迹地图版)接口(商户实现)

(1)客户需要按快递鸟要求开发接口,保证信息的正常接收。
(2)快递鸟主动推送时,物流信息接收接口由客户提供。
(3)接口支持的消息接收方式为HTTP POST,请求方法的编码格式(utf-8):"application/x-www-form-urlencoded;charset=utf-8"。
(4)运单物流信息全量推送(每次推送的运单物流信息包括运单当前所有的的物流信息)。

请求系统级参数说明:

 二、使用流程

三、接口参数

1.即时查询(轨迹地图版)接口

请求内容字段定义:

返回参数定义返回参数定义:

2.快递查询(轨迹地图版)接口

请求内容字段定义:

 返回参数定义:

3.订阅(轨迹地图版)接口

请求内容字段定义:

 返回参数定义:

4.推送(轨迹地图版)接口

应用级输入参数

订阅查询(轨迹地图版)结果(RequestType:102)

通过轨迹查询(订阅查询)接口订阅到快递鸟的数据,快递鸟推送时,会将推送的RequestType的值置为102,同时返回下列数据

请求内容字段定义:

 

返回参数定义

 

四、示例

即时查询(增值版)接口

请求示例 JSON

{
    "IsReturnCoordinates":1,
    "OrderCode":"",
    "ShipperCode":"YTO",
    "LogisticCode":"YT9259962006185",
    "SenderCityName":"泉州市",
    "ReceiverCityName":"亳州市"
}

返回示例 JSON

没有物流轨迹的{
    "ReceiverCityLatAndLng" : "33.8764100,115.7791400",
    "LogisticCode" : "YT9259962006184",
    "ShipperCode" : "YTO",
    "Traces" : [ ],
    "State" : "0",
    "SenderCityLatAndLng" : "24.8894600,118.6130000",
    "EBusinessID" : "1305585",
    "Reason" : "暂无轨迹信息",
    "Success" : true
}有物流轨迹的{
    "StateEx" : "2",
    "EstimatedDeliveryTime" : "2020-08-29 18:53:35",
    "PreCoordinates" : [ {
        "LatAndLng" : "24.8894600,118.6130000",
        "Location" : "泉州市"
    }, {
        "LatAndLng" : "32.9444800,117.3677900",
        "Location" : "蚌埠市"
    }, {
        "LatAndLng" : "33.8764100,115.7791400",
        "Location" : "亳州市"
    } ],
    "ShipperCode" : "YTO",
    "Traces" : [ {
        "Action" : "1",
        "AcceptStation" : "福建省泉州市德化县 揽收成功",
        "AcceptTime" : "2020-08-26 18:53:35",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "福建省泉州市德化县 已打包",
        "AcceptTime" : "2020-08-26 19:08:29",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "福建省泉州市德化县 已发出 下一站 泉州转运中心",
        "AcceptTime" : "2020-08-26 19:16:48",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "泉州转运中心 已发出 下一站 蚌埠转运中心",
        "AcceptTime" : "2020-08-26 21:52:38",
        "Location" : "蚌埠市"
    }, {
        "Action" : "2",
        "AcceptStation" : "蚌埠转运中心 已发出 下一站 安徽省亳州市",
        "AcceptTime" : "2020-08-28 03:05:43",
        "Location" : "亳州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "安徽省亳州市 已收入",
        "AcceptTime" : "2020-08-28 11:59:43",
        "Location" : "亳州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "安徽省亳州市 已收入",
        "AcceptTime" : "2020-08-28 11:59:43",
        "Location" : "亳州市"
    } ],
    "Coordinates" : [ {
        "LatAndLng" : "24.8894600,118.6130000",
        "Location" : "泉州市"
    }, {
        "LatAndLng" : "32.9444800,117.3677900",
        "Location" : "蚌埠市"
    }, {
        "LatAndLng" : "33.8764100,115.7791400",
        "Location" : "亳州市"
    } ],
    "EBusinessID" : "1305585",
    "Success" : true,
    "ReceiverCityLatAndLng" : "33.8764100,115.7791400",
    "LogisticCode" : "YT9259962006185",
    "State" : "2",
    "SenderCityLatAndLng" : "24.8894600,118.6130000",
    "Location" : "亳州市",
    "RouteMapUrl" : ""
}

快递查询(增值版)接口

请求示例 JSON

{
    "IsReturnCoordinates":1,
    "OrderCode":"",
    "ShipperCode":"YTO",
    "LogisticCode":"YT9259962006185",
    "SenderCityName":"泉州市",
    "ReceiverCityName":"亳州市"
}

返回示例 JSON

没有物流轨迹的{
    "ReceiverCityLatAndLng" : "33.8764100,115.7791400",
    "LogisticCode" : "YT9259962006184",
    "ShipperCode" : "YTO",
    "Traces" : [ ],
    "State" : "0",
    "SenderCityLatAndLng" : "24.8894600,118.6130000",
    "EBusinessID" : "1305585",
    "Reason" : "暂无轨迹信息",
    "Success" : true
}有物流轨迹的{
    "StateEx" : "2",
    "EstimatedDeliveryTime" : "2020-08-29 18:53:35",
    "PreCoordinates" : [ {
        "LatAndLng" : "24.8894600,118.6130000",
        "Location" : "泉州市"
    }, {
        "LatAndLng" : "32.9444800,117.3677900",
        "Location" : "蚌埠市"
    }, {
        "LatAndLng" : "33.8764100,115.7791400",
        "Location" : "亳州市"
    } ],
    "ShipperCode" : "YTO",
    "Traces" : [ {
        "Action" : "1",
        "AcceptStation" : "福建省泉州市德化县 揽收成功",
        "AcceptTime" : "2020-08-26 18:53:35",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "福建省泉州市德化县 已打包",
        "AcceptTime" : "2020-08-26 19:08:29",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "福建省泉州市德化县 已发出 下一站 泉州转运中心",
        "AcceptTime" : "2020-08-26 19:16:48",
        "Location" : "泉州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "泉州转运中心 已发出 下一站 蚌埠转运中心",
        "AcceptTime" : "2020-08-26 21:52:38",
        "Location" : "蚌埠市"
    }, {
        "Action" : "2",
        "AcceptStation" : "蚌埠转运中心 已发出 下一站 安徽省亳州市",
        "AcceptTime" : "2020-08-28 03:05:43",
        "Location" : "亳州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "安徽省亳州市 已收入",
        "AcceptTime" : "2020-08-28 11:59:43",
        "Location" : "亳州市"
    }, {
        "Action" : "2",
        "AcceptStation" : "安徽省亳州市 已收入",
        "AcceptTime" : "2020-08-28 11:59:43",
        "Location" : "亳州市"
    } ],
    "Coordinates" : [ {
        "LatAndLng" : "24.8894600,118.6130000",
        "Location" : "泉州市"
    }, {
        "LatAndLng" : "32.9444800,117.3677900",
        "Location" : "蚌埠市"
    }, {
        "LatAndLng" : "33.8764100,115.7791400",
        "Location" : "亳州市"
    } ],
    "EBusinessID" : "1305585",
    "Success" : true,
    "ReceiverCityLatAndLng" : "33.8764100,115.7791400",
    "LogisticCode" : "YT9259962006185",
    "State" : "2",
    "SenderCityLatAndLng" : "24.8894600,118.6130000",
    "Location" : "亳州市",
    "RouteMapUrl" : ""
}

订阅(增值版)接口

请求示例 JSON

{
    "ShipperCode":"SF",
    "OrderCode":"SF201608081055208281",
    "LogisticCode":"3100707578976",
    "PayType":"1",
    "ExpType":"1",
    "CustomerName":"",
    "CustomerPwd":"",
    "MonthCode":"",
    "IsNotice":"0",
    "Sender":{
        "Name":"1255760",
        "Tel":"",
        "Mobile":"13700000000",
        "ProvinceName":"广东省",
        "CityName":"深圳市",
        "ExpAreaName":"福田区",
        "Address":"测试地址"
    },
    "Receiver":{
        "Name":"1255760",
        "Tel":"",
        "Mobile":"13800000000",
        "ProvinceName":"广东省",
        "CityName":"深圳市",
        "ExpAreaName":"龙华新区",
        "Address":"测试地址2"
    },
    "Commodity":[
        {
            "GoodsName":"书本"
        }
    ],
    "IsReturnCoordinates": 1
}

返回示例 JSON

{
    "EBusinessID":"1151847",
    "UpdateTime":"2016-08-09 16:42:38",
    "Success":true,
    "Reason":"",
    "SenderCityLatAndLng":"113.88308,22.55329",
    "ReceiverCityLatAndLng":"113.88308,22.55329"
}

推送接口(增值版)

请求示例 JSON[订阅查询(增值版)]

{
    "EBusinessID":"1261585",
    "Count":"1",
    "PushTime":"2016-11-03 11:54:34",
    "Data":[
        {
            "EBusinessID":"1261585",
            "ShipperCode":"ZTO",
            "LogisticCode":"416071867790",
            "Success":true,
            "State":"2",
            "Traces":[
                {
                    "AcceptTime":"2016-10-28 17:54:18",
                    "AcceptStation":"杭州钱江开发区 的 悠可1 已收件",
                    "Location":"杭州市",
                    "Action":"1"
                },
                {
                    "AcceptTime":"2016-10-28 19:10:59",
                    "AcceptStation":"快件离开 杭州钱江开发区 已发往 上海",
                    "Location":"杭州市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-28 21:49:34",
                    "AcceptStation":"快件已到达 杭州中转部",
                    "Location":"杭州市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-28 22:39:12",
                    "AcceptStation":"快件离开 杭州中转部 已发往 上海",
                    "Location":"杭州市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-29 02:07:53",
                    "AcceptStation":"快件已到达 上海航空部",
                    "Location":"上海市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-29 02:36:04",
                    "AcceptStation":"快件离开 上海 已发往 杨浦同济",
                    "Location":"上海市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-29 03:28:29",
                    "AcceptStation":"快件已到达 上海",
                    "Location":"上海市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-29 07:25:46",
                    "AcceptStation":"快件已到达 杨浦同济",
                    "Location":"上海市",
                    "Action":"2"
                },
                {
                    "AcceptTime":"2016-10-29 07:27:02",
                    "AcceptStation":"杨浦同济 的 近邻宝 正在派件",
                    "Location":"上海市",
                    "Action":"402"
                }
            ],
            "StateEx":"402",
            "Location":"上海市"
        }
    ]
}

返回示例JSON

{
    "EBusinessID":"1261585",
    "UpdateTime":"2016-08-09 16:42:38",
    "Success":true,
    "Reason":""
}

最后

以上就是疯狂酸奶为你收集整理的快递鸟物流查询轨迹地图API接口案例代码java的全部内容,希望文章能够帮你解决快递鸟物流查询轨迹地图API接口案例代码java所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(31)

评论列表共有 0 条评论

立即
投稿
返回
顶部