A AuthMS API Wiki API Reference iam.tianv.com →

POST /wallets/{user_id}/coupons/{code}/redeem

用户使用优惠券码兑换优惠券

钱包服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
user_id path string Yes 用户ID
code path string Yes 优惠券码
wallet_id query string No 钱包ID

Responses

StatusDescriptionSchema
200OKdto.RedeemCouponResponse
400请求参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证或令牌无效gitee_com_linmes_authms_base_dto.SimpleResponse
500服务内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.CouponResponse

优惠券信息

FieldTypeRequiredExampleConstraintsDescription
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

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.CouponResponse No
message string No
timestamp string No

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No