优惠券模块
优惠券列表
接口地址
请求方式:GET 不需要授权
{host}/api/coupons
响应结果
响应示例
{
"code": "200",
"msg": "ok",
"data": {
"has_more": false,
"list": [{
"id": 3,
"title": "测试折扣券",
"type": {
"value": 2,
"key": "DISCOUNT",
"description": "折扣券"
},
"min_consume": "10.00",
"coupon_value": "0.95",
"total_count": 3,
"received_count": 2,
"effect_type": {
"value": 1,
"key": "FIXED_DATE",
"description": "固定时间"
},
"effect_days": 7,
"effect_start_date": "2022-04-11",
"effect_end_date": "2022-05-11",
"usable_product": {
"value": 0,
"key": "ALL",
"description": "全部商品可用"
},
"remark": "测试折扣券",
"sequence": 100,
"coupon_status": {
"value": 2,
"key": "USED",
"description": "已使用"
},
"status": {
"value": 1,
"key": "ENABLED",
"description": "启用"
}
}, {
"id": 4,
"title": "测试会员赠券",
"type": {
"value": 1,
"key": "FULL_REDUCTION",
"description": "满减券"
},
"min_consume": "200.00",
"coupon_value": "100.00",
"total_count": 2,
"received_count": 1,
"effect_type": {
"value": 0,
"key": "AT_ONCE",
"description": "领取后生效"
},
"effect_days": 7,
"effect_start_date": null,
"effect_end_date": null,
"usable_product": {
"value": 0,
"key": "ALL",
"description": "全部商品可用"
},
"remark": "不可叠加使用",
"sequence": 100,
"coupon_status": {
"value": 3,
"key": "EXPIRED",
"description": "已过期"
},
"status": {
"value": 1,
"key": "ENABLED",
"description": "启用"
}
}, {
"id": 5,
"title": "满50减20",
"type": {
"value": 1,
"key": "FULL_REDUCTION",
"description": "满减券"
},
"min_consume": "0.00",
"coupon_value": "50.00",
"total_count": 10,
"received_count": 0,
"effect_type": {
"value": 0,
"key": "AT_ONCE",
"description": "领取后生效"
},
"effect_days": 7,
"effect_start_date": null,
"effect_end_date": null,
"usable_product": {
"value": 0,
"key": "ALL",
"description": "全部商品可用"
},
"remark": "不可叠加使用",
"sequence": 100,
"coupon_status": {
"value": 0,
"key": "INIT",
"description": ""
},
"status": {
"value": 1,
"key": "ENABLED",
"description": "启用"
}
}]
}
}
优惠券领取
接口地址
请求方式:GET 需要授权
{host}/api/coupons/receive/{id}
我的优惠券
接口地址
请求方式:GET 需要授权
{host}/api/coupons/mine