/admin/wallets/coupons/{coupon_id}
更新指定优惠券
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
coupon_id |
path |
string |
是 | 优惠券ID |
请求体
Schema: service-wallet/internal/handler/dto.UpdateCouponRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
string |
否 | |||
expires_at |
string |
否 | |||
min_spend |
string |
否 | |||
name |
string |
否 | |||
type |
string |
否 | |||
value |
string |
否 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | OK | service-wallet/internal/handler/dto.CouponCreateDetailResponse |
| 400 | 请求参数错误 | service-core/base/dto.SimpleResponse |
| 401 | 未认证或令牌无效 | service-core/base/dto.SimpleResponse |
| 403 | 权限不足 | service-core/base/dto.SimpleResponse |
| 500 | 服务内部错误 | service-core/base/dto.SimpleResponse |
引用的 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 |
价值 |