POST /wallets/coupons

创建新的优惠券

钱包服务 `bearerAuth` application/json

请求体

Schema: service-wallet/internal/handler/dto.CreateCouponRequest

字段类型必填示例约束描述
code string 是 SUMMER2026
type string 是 discount
value string 是 10.00
currency string 否 CNY
expires_at string 否 2026-12-31T23:59:59Z
min_spend string 否 50.00
name string 否 夏日优惠券

响应

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-wallet/internal/handler/dto.CouponCreateDetailResponse

字段类型必填示例约束描述
code integer 否
data service-wallet/internal/handler/dto.CouponCreateResult 否
message string 否
timestamp string 否

service-wallet/internal/handler/dto.CouponCreateResult

字段类型必填示例约束描述
code string 否 SUMMER2026 优惠券码
coupon_id string 否 cpn_abc123 优惠券ID
currency string 否 CNY 货币
expires_at string 否 2026-12-31T23:59:59Z 过期时间
status string 否 active 状态
type string 否 discount 类型
value string 否 10.00 价值