获取优惠券信息
请求地址
/api/v2/coupon/info
公共请求参数
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| coupon_code | 是 | string | 优惠券编码 |
响应参数
| 名称 | 类型 | 说明 |
|---|---|---|
| coupon_name | string | 优惠券名称 |
| coupon_code | string | 优惠券码 |
| coupon_type | string | 优惠券类型,GENERAL:通用券(只能直接核销) CASH:代金券 DISCOUNT:折扣券 |
| discount | int | 折扣券专用,表示打折额度,填70就是打七折 |
| reduce_cost | int | 减免金额,代金券时表示券金额面额(单位分),折扣券时表示最大折扣金额(单位分) |
| effective_time | string | 生效时间 |
| expire_time | string | 失效时间 |
| description | string | 优惠券描述 |
| receive_time | string | 领取时间 |
| status | int | 券状态,1:正常,待使用,2:已核销,3:赠送中,4:已过期 |
| user_no | String | 会员编号, 仅会员时返回, 可用于会员信息查询 |
请求示例
:::: tabs
::: tab biz_content
{
"coupon_code": "1888888888"
}
:::
::: tab 原始数据
{
"open_app_id": "kd100020191120",
"open_mch_id": "60882970237033",
"timestamp": 1574908421,
"sign_type": "MD5",
"token": "087c96a2-5557-4237-a09b-4ca0bcedbdbf",
"biz_content": "{\"coupon_code\": 410203262022}",
"sign": "35e61fb1aab95cdf314639972b8cbbb2"
}
:::
::::
响应示例
:::: tabs
::: tab result
{
"code": 0,
"data": {
"coupon_code": "410203262022",
"coupon_name": "2元代金券",
"coupon_type": "CASH",
"description": "无门槛立减2元,单笔订单最多可使用30张",
"discount": 100,
"effective_time": "2019-11-27 00:00",
"expire_time": "2020-03-05 00:00",
"is_expired": false,
"receive_time": "2019-11-27 10:33",
"reduce_cost": 200,
"status": 2,
"user_no": "MID000WQANN"
},
"msg": "success",
"succeed": true
}
:::
::: tab 原始数据
{
"result": "{\"code\":0,\"data\":{\"available_periods\":[],\"color\":\"Color010\",\"coupon_code\":\"410203262022\",\"coupon_name\":\"2元代金券\",\"coupon_type\":\"CASH\",\"description\":\"无门槛立减2元,单笔订单最多可使用30张\",\"effective_time\":\"2019-11-27 00:00\",\"expire_time\":\"2020-03-05 00:00\",\"limit_shop_list\":[],\"receive_time\":\"2019-11-27 10:33\",\"status\":1},\"msg\":\"success\",\"succeed\":true}",
"sign": "4bdbfa3e36730a3b2293d9929d1511d1"
}
::: ::::