跳到主要内容

查询消耗折扣券列表

请求方法

GET

请求地址

/api/v1/coupon/consumption/list

请求参数(query)

参数名参数类型参数释义
currentNumber可选,页码,默认 1
page_sizeNumber可选,每页大小,默认 30,最大 100
statusString可选,按优惠券状态筛选,枚举值
billing_modeString可选,按计费模式筛选,枚举值
regionString可选,按可用区筛选
service_typeString可选,按服务类型筛选,枚举值
sku_idNumber可选,按 SKU 筛选

计费模式枚举

枚举值释义
ByUsage按量(分钟计费)
Weekly包周
Monthly包月

服务类型枚举

枚举值释义
Endpoints星舟推理
Space工作空间
Hsdd高速数据盘
Netdisk实例共享存储

返回数据

参数名参数类型参数释义
codeNumber错误码,0 为正常
msgString错误描述
dataData数据 Object

Data

参数名参数类型参数释义
totalNumber总数
coupons[]Coupon列表

Coupon

参数名参数类型参数释义
idNumber优惠券 ID
nameString优惠券名称
descString优惠券描述
statusString优惠券状态,枚举值
modeString折扣模式,枚举值
valueNumber优惠券面值
extraString优惠券详情,包括使用限制、折扣比例、生效时间等
expire_timeString过期时间
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
}
}