# API文档
## 获取快递名称和价格接口
* 接口地址:http://ecshop.kkyyy.net/index/api/kbtype
* 请求方式:post
* 请求参数:json格式
aipkey:登录会员中心获得
* 请求示例
```
{
"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://ecshop.kkyyy.net/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)
* 请求示例
```
{
"apikey": "CO8syB7pgK3kD99U",
"goods": "物品",
"weight": 1,
"express": 288,
"address":{
"name": "张三",
"mobile": "15900159000",
"province": "广东省",
"city": "中山市",
"district": "岳阳区",
"info": "解放路888号",
"zipcode": "510000"
},
"items":[
{
"name": "李四",
"mobile": "13800138000",
"province": "河南省",
"city": "洛阳市",
"district": "西工区",
"info": "金谷园路888号",
"zipcode": "471900"
},
{
"name": "王五",
"mobile": "13900139000",
"province": "江苏省",
"city": "徐州市",
"district": "奉化区",
"info": "京广路888号",
"zipcode": "221000"
}
]
}
```
* 返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
* 返回示例
```
{
"code": "200",
"msg": "success"
"data": [
{
"express_no": "5707558778"
},
{
"express_no": "5707558193"
}
]
}
```
## 快递状态查询接口
* 接口地址:http://ecshop.kkyyy.net/index/api/kbstatus
* 请求方式:post
* 请求参数:json格式
aipkey:登录会员中心获得
express_no:快递下单接口返回的物流单号
* 请求示例
```
{
"apikey": "CO8syB7pgK3kD99U",
"express_no": "5707558778"
}
```
* 返回数据
code 状态码 200-正常; 101- 报错
msg 提示信息
* 返回示例
```
{
"code": "200",
"msg": "查询成功"
"data": {
"express_no": "5707558778",
"exp_status": "等待发货"}
}
```