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

POST /wallets/coupons

创建新的优惠券

钱包服务 `bearerAuth` application/json

Request Body

Schema: dto.CreateCouponRequest

FieldTypeRequiredExampleConstraintsDescription
code string Yes SUMMER2026
type string Yes discount
value string Yes 10.00
currency string No CNY
expires_at string No 2026-12-31T23:59:59Z
min_spend string No 50.00
name string No 夏日优惠券

Responses

StatusDescriptionSchema
201Createddto.CouponCreateDetailResponse
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.CouponCreateDetailResponse

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

dto.CouponCreateResult

FieldTypeRequiredExampleConstraintsDescription
code string No SUMMER2026 优惠券码
coupon_id string No cpn_abc123 优惠券ID
currency string No CNY 货币
expires_at string No 2026-12-31T23:59:59Z 过期时间
status string No active 状态
type string No discount 类型
value string No 10.00 价值

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No