版本:202201
创建折扣码
POST/openapi/2022-01/price_rules/:price_rule_id/discount_codes
创建与指定价格规则关联的折扣码。
请求
Path参数
price_rule_id string必填
价格规则 ID。
- application/json
- 请求体
- 示例
请求体
discount_code object
codestring必填
Discount code, e.g. SGTIOZT
{
"discount_code": {
"code": "string"
}
}
响应
- 200
200
- application/json
- 数据结构
- 示例
- Result
数据结构
discount_code object
idstring
示例:
f819c126-a581-4d66-a909-08282dd35916price_rule_idstring
示例:
588fea0b-f15d-4c1d-9390-23661f0194facodestring
示例:
VIJK8GB0created_atstring
示例:
2022-06-17 07:48:29updated_atstring
示例:
2022-06-17 07:48:29use_with_otherstring
示例:
1usage_countstring
示例:
0{
"discount_code": {
"id": "f819c126-a581-4d66-a909-08282dd35916",
"price_rule_id": "588fea0b-f15d-4c1d-9390-23661f0194fa",
"code": "VIJK8GB0",
"created_at": "2022-06-17 07:48:29",
"updated_at": "2022-06-17 07:48:29",
"use_with_other": "1",
"usage_count": "0"
}
}
{
"discount_code": {
"id": "f819c126-a581-4d66-a909-08282dd35916",
"price_rule_id": "588fea0b-f15d-4c1d-9390-23661f0194fa",
"code": "VIJK8GB0",
"created_at": "2022-06-17 07:48:29",
"updated_at": "2022-06-17 07:48:29",
"use_with_other": "1",
"usage_count": "0"
}
}