版本:202506
更新折扣码
PUT/openapi/2025-06/price_rules/:price_rule_id/discount_codes/:discount_code_id
更新指定价格规则下现有折扣码的详细信息。
请求
Path参数
price_rule_id string必填
折扣码关联的价格规则 ID
discount_code_id string必填
折扣码 ID
- application/json
- 请求体
- 示例
请求体必填
discount_code object必填
折扣码
codestring
代码
{
"discount_code": {
"code": "string"
}
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
codestring
错误码
messagestring
错误信息
data object
discount_code object
折扣码
idstring
折扣 ID
price_rule_idstring
价格规则 ID
codestring
折扣码
created_atstring
创建时间,ISO-8601 格式
updated_atstring
最后更新时间,ISO-8601 格式
use_with_otherint32
是否可与其他折扣叠加
usage_countint32
已使用次数
{
"code": "string",
"message": "string",
"data": {
"discount_code": {
"id": "string",
"price_rule_id": "string",
"code": "string",
"created_at": "string",
"updated_at": "string",
"use_with_other": 0,
"usage_count": 0
}
}
}