#用户优惠券接口
接口列表
接口描述
1、查询优惠券的列表信息(app.promotion.queryCoupon)
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
method |
String |
true |
app.promotion.queryCoupon |
请求方法 |
couponType |
int |
true |
4 |
券类型 1 A券 2 B券 3 公开券4 生日券5 免邮券 |
响应内容
2、查询生日券列表(app.promotion.queryBirthCoupon)
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
method |
String |
true |
app.promotion.queryBirthCoupon |
请求方法 |
couponType |
int |
true |
4 |
券类型 1 A券 2 B券 3 公开券4 生日券5 免邮券 |
uid |
int |
true |
7893817 |
用户ID |
响应内容
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"couponAmount": 50,
"couponCode": "",
"couponName": "12月生日券-满199减50",
"endTime": "2017-01-31 09:45:40",
"id": 2030,
"startTime": "2013-12-01 00:00:00",
"status": 1,
"useLimit": "199",
"useLimitType": "2"
},
{
"couponAmount": 300,
"couponCode": "",
"couponName": "12月生日券-满799减300",
"endTime": "2017-01-31 09:45:40",
"id": 2033,
"startTime": "2013-12-01 00:00:00",
"status": 1,
"useLimit": "799",
"useLimitType": "2"
},
{
"couponAmount": 50,
"couponCode": "",
"couponName": "1月生日券-满199减50",
"endTime": "2017-01-31 09:45:40",
"id": 2035,
"startTime": "2014-01-01 00:00:00",
"status": 1,
"useLimit": "199",
"useLimitType": "2"
},
{
"couponAmount": 300,
"couponCode": "",
"couponName": "1月生日券-满799减300",
"endTime": "2017-01-31 09:45:40",
"id": 2038,
"startTime": "2014-01-01 00:00:00",
"status": 1,
"useLimit": "799",
"useLimitType": "2"
}
],
"md5": "c957283765172838f577de4228d45a42",
"message": "请求成功"
}
3、用户领券(app.promotion.getCoupon)
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
method |
String |
true |
app.promotion.getCoupon |
请求方法 |
uid |
int |
true |
7893817 |
用户ID |
couponId |
int |
true |
23121 |
券id |
响应内容
成功响应:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"123456abcdef"
},
"md5": "50d19f5f5098c34607018f144baec14a",
"message": "操作成功"
}
错误响应:
{
"code": 402,
"message": "优惠券不存在"
}
{
"code": 306,
"message": "很抱歉!您的用户身份类型不可使用该券"
}
{
"code": 401,
"message": "优惠券已经领取"
}
4、查询优惠券中心(app.promotion.queryCouponCenter)
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
method |
String |
true |
app.promotion.queryCouponCenter |
请求方法 |
uid |
String |
false |
7893817 |
用户ID |
code |
String |
true |
1112 |
券和资源位关联的code |
couponId |
String |
true |
23121,11759,45213 |
券id列表 |
响应内容
成功响应:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"code": "1112",
"status": 1,
"hasNum":99999
},
"md5": "50d19f5f5098c34607018f144baec14a",
"message": "操作成功"
}
备注:status 1:可领取 2:已抢光 3:已领取