查询消耗折扣券列表
请求方法
GET
请求地址
/api/v1/coupon/consumption/list
请求参数(query)
参数名 | 参数类型 | 参数释义 |
---|---|---|
current | Number | 可选,页码,默认 1 |
page_size | Number | 可选,每页大小,默认 30,最大 100 |
status | String | 可选,按优惠券状态筛选,枚举值 |
billing_mode | String | 可选,按计费模式筛选,枚举值 |
region | String | 可选,按可用区筛选 |
service_type | String | 可选,按服务类型筛选,枚举值 |
sku_id | Number | 可选,按 SKU 筛选 |
计费模式枚举
枚举值 | 释义 |
---|---|
ByUsage | 按量(分钟计费) |
Weekly | 包周 |
Monthly | 包月 |
服务类型枚举
枚举值 | 释义 |
---|---|
Endpoints | 星舟推理 |
Space | 工作空间 |
Hsdd | 高速数据盘 |
Netdisk | 实例共享存储 |
返回数据
参数名 | 参数类型 | 参数释义 |
---|---|---|
code | Number | 错误码,0 为正常 |
msg | String | 错误描述 |
data | Data | 数据 Object |
Data
参数名 | 参数类型 | 参数释义 |
---|---|---|
total | Number | 总数 |
coupons | []Coupon | 列表 |
Coupon
参数名 | 参数类型 | 参数释义 |
---|---|---|
id | Number | 优惠券 ID |
name | String | 优惠券名称 |
desc | String | 优惠券描述 |
status | String | 优惠券状态,枚举值 |
mode | String | 折扣模式,枚举值 |
value | Number | 优惠券面值 |
extra | String | 优惠券详情,包括使用限制、折扣比例、生效时间等 |
expire_time | String | 过期时间 |
reasons | []String | 如果不可用,原因是? 枚举值列表 |
优惠券状态枚举
枚举值 | 释义 |
---|---|
Unused | 未使用 |
Used | 已使用 |
Expired | 已过期 |
Available | 未使用且可用 |
Unavailable | 未使用不可用 |
折扣模式枚举
枚举值 | 释义 |
---|---|
FixedDiscount | 固定金额折扣 |
PercentDiscount | 百分比折扣 |
优惠券不可用原因枚举
枚举值 | 释义 |
---|---|
NotApplicableBillingMode | 不适用的计费模式 |
NotApplicableRegion | 不适用的可用区 |
NotApplicableServiceType | 不适用的服务类型 |
NotApplicableSku | 不适用的 SKU |
NotDiscountTime | 不在优惠时间内 |
UnderThreshold | 低于优惠门槛 |
Used | 已使用 |
Expired | 已过期 |
请求示例
无
返回示例
{
"code": 0,
"msg": "OK",
"data": {
"coupons": [
{
"id": "1832977761141002240",
"name": "无条件消耗折扣券-001",
"category": "Consumption",
"desc": "仅限一分钟",
"status": "Available",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:8折\n折扣时长:60秒\n",
"expire_time": "2025-01-01 00:00:00",
"reasons": null
},
{
"id": "1833044713138032640",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833044713167392768",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833044713205141504",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833044713234501632",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833044713263861760",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833044713293221888",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
},
{
"id": "1833046581713047552",
"name": "space-3090",
"category": "Consumption",
"desc": "空间3090打折券",
"status": "Unavailable",
"mode": "PercentDiscount",
"value": 1,
"extra": "使用限制条件:无\n折扣说明:9.5折\n折扣时长:60秒\n",
"expire_time": "2024-09-30 14:38:00",
"reasons": [
"NotApplicableBillingMode",
"NotDiscountTime"
]
}
],
"total": 9
}
}