POST /wallets/{user_id}/coupons/{code}/redeem
用户使用优惠券码兑换优惠券
钱包服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
user_id |
path |
string |
Yes |
|
|
|
用户ID |
code |
path |
string |
Yes |
|
|
|
优惠券码 |
wallet_id |
query |
string |
No |
|
|
|
钱包ID |
Referenced Schemas
dto.CouponResponse
优惠券信息
| Field | Type | Required | Example | Constraints | Description |
code |
string |
No |
DISCOUNT20 |
|
码 |
created_at |
string |
No |
2026-01-01T00:00:00Z |
|
创建 |
id |
string |
No |
cpn_abc123 |
|
ID |
min_amount |
string |
No |
100.00 |
|
最低消费 |
name |
string |
No |
20元优惠券 |
|
名称 |
status |
string |
No |
unused |
|
状态 |
type |
string |
No |
cash |
|
类型 |
used_at |
string |
No |
|
|
使用时间 |
used_order_id |
string |
No |
|
|
订单ID |
valid_from |
string |
No |
2026-01-01T00:00:00Z |
|
生效 |
valid_until |
string |
No |
2026-12-31T23:59:59Z |
|
失效 |
value |
string |
No |
20.00 |
|
价值 |
dto.RedeemCouponResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.CouponResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|