API文档(请看礼品接口)
获取快递名称和价格接口
{
"apikey": "CO8syB7pgK3kD99U"
}
-
返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
data 快递信息数组(编号id,名称name,描述comm,价格price)
-
返回示例
{
"code": "200",
"msg": "success",
"data": [
{
"id": "287",
"name": "圆通快递",
"comm": "本快递是拼多多电子面单支持全国发货直接购买后发货无需申请网点,每天14点之前下单当天18点左右出物流,22:00点之前下单早上10点左右出物流,超22:00点以后购买的是第二天14点发货!",
"price": "0.7"
},
{
"id": "288",
"name": "申通快递",
"comm": "本快递是拼多多电子面单支持全国发货直接购买后发货无需申请网点,每天14点之前下单当天18点左右出物流,22:00点之前下单早上10点左右出物流,超22:00点以后购买的是第二天14点发货!",
"price": "0.7"
}
]
}
快递下单接口
-
接口地址:http://域名/index/api/kbxd
-
请求方式:post
-
请求参数:json格式
aipkey:登录会员中心获得
goods:物品名称(字符串)
weight:物品重量(数字)单位kg
express:快递编号(从第一个接口获得)
address:发货地址信息(省份province、城市city、区县district、街道门牌号info、发件人name,手机号mobile、邮编zipcode)
items:收货地址信息(省份province、城市city、区县district、街道门牌号info、收件人name,手机号mobile、邮编zipcode)
-
请求示例
增加下单校验规则:
1、收货人手机号11位校验
2、外部下单订单号必填、唯一性校验
3、外部下单时间必填
{
"apikey": "CO8syB7pgK3kD99U",
"goods": "物品",
"weight": 1,
"express": 288,
"address":{
"name": "张三",
"mobile": "15900159000",
"province": "广东省",
"city": "中山市",
"district": "岳阳区",
"info": "解放路888号",
"zipcode": "510000"
},
"items":[
{
"out_order_no": "321232423444",//外部唯一订单号,长度100内
"name": "李四",
"mobile": "13800138000",
"province": "河南省",
"city": "洛阳市",
"district": "西工区",
"info": "金谷园路888号",
"zipcode": "471900",
"order_time":"2020-06-24 01:01:01"//下单时间,
},
{
"out_order_no": "321232423444",//外部唯一订单号,长度100内
"name": "王五",
"mobile": "13900139000",
"province": "江苏省",
"city": "徐州市",
"district": "奉化区",
"info": "京广路888号",
"zipcode": "221000",
"order_time":"2020-06-24 01:01:01"//下单时间,
}
]
}
-
返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
-
返回示例
{
"code": 200,
"msg": "成功",
"data": [
{
"outer_order_no": "321232423444",
"express_no": "78134176651125"
},
{
"outer_order_no": "32132231232435",
"express_no": "78134176651166"
}
]
}
快递状态查询接口
{
"apikey": "CO8syB7pgK3kD99U",
"start_time":"2020-06-01 00:00:00",
//查询开始范围 不支持跨月查询 查询的订单下单时间最好在当月查询访问内
"end_time":"2020-06-30 23:59:59",
//查询结束范围 不支持跨月查询 查询的订单下单时间最好在当月查询访问内
"express_no": ["5707558778","5707558777"]
}
-
返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
-
返回示例
{
"code": 200,
"msg": "查询成功",
"data": [
{
"express_no": "78134176651125",
"exp_status": "等待发货"
},
{
"express_no": "78134176651166",
"exp_status": "等待发货"
}
]
}
1.4快递取消接口
{
"apikey": "Cr17zBe0gvrkDttS",
"express_no":"EFS000007641096",
"order_time":"2020-06-01 00:05:06"//下单时间
}
-
返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
-
返回示例
{
"code": "200",
"msg": "订单取消成功"
"data":""
}