XXX项目APP接口文档
注:
传参一律用post方式,key=request, value为一串json格式字符串,格式如:
request={
"head": {
"partner": "xxxxxxxxxxxxxxxxxxxxxxx",
"key": "xxxxxxxxx",
"mdkey": "xxxxxxxxxxx"
},
"para": {
"user_name": "user_name",
"pwd": "123456"
},
"result": {
"start": 0,
"count": 10
}
}
head:头信息,用于安全校验,参数固定为partner、key、mdkey 三项,mdkey随不同接口而变,partner和key为常量
头部信息校验错误统一返回,错误码分三种:
1:PARTNER有误
{
"head": {
"code": "C0004",
"msg": "PARTNER验证失败!"
}
}
2:KEY有误
{
"head": {
"code": "C0005",
"msg": "KEY验证失败!"
}
}
3:MD5加密错误
{
"head": {
"code": "C0001",
"msg": "请求验证失败!"
}
}
para:请求体,客户端请求所需要传入的参数,依据不同接口而定
result:结果集,主要用于分页
首页
首页
URL:
输入参数:
request={
"head": {
"partner": "77b872abfe1260053032219354882d91",
"key": "ldingadmin",
"mdkey": md5(partner+key)
},
"result": {
"start": 0, //从第0条数据开始,(首页此项参数只能为0)
"count": 20 //总共返回20条数据,(即每页显示数量,由客户端自定)
}
}
输入参数说明:
参数 | 参数明细 | 类型(长度范围) | 参数说明 | 是否可空 | 样例 |
head | partner | String | 合作者ID | 不可空 | a4bf5363f7bd76c5a4975b75f19f63ca |
key | String | 合作者KEY | 不可空 | ldingadmin | |
mdkey | String | MD5加密字符 md5(partner+key) | 不可空 | a4bf5363f7bd76c5a4975b75f19f63ca | |
result | start | Int | 分页数据开始标示id | 可空(固定为0) | 0 |
count | Int | 返回总数据条数 | 可空(为空时采用系统默认值20) | 20 | |
返回码描述:
错误码:
参考头部信息校验统一错误码
正确返回:
{
"head": {
"code": "10000",
"msg": "数据获取成功"
},
"para": {
"banner": [
{
"ad_id": "2",
"ad_name": "首页轮转2",
"pic": "www.lding/data/files/mall/ad/1434512150.jpg",
"link": "www.lding/index.php?app=search&act=products&cid=1312",
"image_size": {
"width": 1200,
"height": 475
}
},
{
"ad_id": "3",
"ad_name": "首页轮转3",
"pic": "www.lding/data/files/mall/ad/1434523823.png",
"link": "www.lding/joinus/",
"image_size": {
"width": 1200,
"height": 475
}
}
……
],
"cate": [
{
"cate_id": "1216",
"cate_name": "女装",
"cate_ename": "WOMEN",
"cate_banner": "www.lding/data/files/mall/category/2015/06/201506100640272205.jpg",
"image_size": {
"width": 460,
"height": 300
}
},
{
"cate_id": "1217",
app模板网站 "cate_name": "男装",
"cate_ename": "MEN",
"cate_banner": "www.lding/data/files/mall/category/2015/06/201506081359262711.jpg",
"image_size": {
"width": 460,
"height": 300
}
}
……
],
"pic": [
{
"pic_id": "311",
"pic_name": "小女孩·柠檬汽水",
"price": "25.00",
"pic_url": "www.lding/data/files/store_238/pic/2015/06/201506160937045578.jpg",
"collects": "1",
"views": "0",
"sales": "0",
"image_size": {
"width": 2063,
"height": 2063
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论