版本:202506
创建折扣码
POST/openapi/2025-06/price_rules/:price_rule_id/discount_codes
创建与指定价格规则关联的折扣码。
请求
Path参数
price_rule_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
}
}
}