创建非自动折扣
POST/openapi/2026-01/discounts/non-automatic
创建一个需要使用折扣码的非自动折扣活动。
请求
- application/json
- 请求体
- 示例
请求体必填
product: 商品折扣order: 订单折扣shipping: 运费折扣code_percent: 折扣码百分比折扣code_fix_price_reduction: 折扣码固定减免code_bxgy: 折扣码买 X 送 Ycode_free_shipping: 折扣码免运费entitled: 仅包含指定商品exclude: 排除指定商品all: 包含所有商品(默认)product: 同商品库存discount: 使用活动库存product: 可与商品折扣叠加order: 可与订单折扣叠加shipping: 可与运费折扣叠加no_condition: 无条件purchase_quantity: 满件数purchase_amount: 满金额no_discount: 无优惠free_acquisition: 免费领取percent: 百分比折扣fixed_price_reduction: 固定金额减免fixed_price: 固定最终价格fixed_quantity: 固定数量赠送product_price_reduction: 商品级别价格减免- Array [
- ]
- Array [
- ]
entitled: 仅包含指定商品exclude: 排除指定商品all: 包含所有商品(默认)product: 同商品库存discount: 使用活动库存
discount object必填
折扣信息
discount_info object必填
折扣信息
折扣名称
店铺前台展示名称
折扣目标:
折扣类型:
折扣码列表,一个折扣可关联多个折扣码
开始时间
结束时间。-1 表示折扣永久有效
entitled_customer object
授权顾客
顾客 ID 列表
顾客分组 ID 列表
entitled_product object
授权商品
商品 ID 列表
规格 ID 列表
集合 ID 列表
sort object
排序配置
商品排序字段
排序方向,如 asc(升序)或 desc(降序)
商品范围选择策略:
sku_extends object
各规格的扩展设置,以规格 ID 为键
property name* SkuExtendReq
领取值
最小购买数量
序列号
虚拟销量
活动库存是否跟随商品库存:
库存数量
集合 ID
discount_rule object
折扣规则
折扣最大使用次数,-1 表示不限
每位顾客最大使用次数,-1 表示不限
每笔订单最大使用次数,-1 表示不限
每个折扣码最大使用次数,-1 表示不限
每位顾客每个折扣码最大使用次数,-1 表示不限
是否已满额领取
可叠加的折扣类别:
discount_layer object必填
折扣层级
条件类型:
优惠类型:
layers object[]必填
层级列表
条件值
领取值
领取数量
entitled_area object
授权地区
areas object[]
地区列表
国家代码(如 CN)
省份代码列表
obtain_product object
领取商品
商品 ID 列表
规格 ID 列表
集合 ID 列表
sort object
排序配置
商品排序字段
排序方向,如 asc(升序)或 desc(降序)
商品范围选择策略:
sku_extends object
各规格的扩展设置,以规格 ID 为键
property name* SkuExtendReq
领取值
最小购买数量
序列号
虚拟销量
活动库存是否跟随商品库存:
库存数量
集合 ID
{
"discount": {
"discount_info": {
"discount_name": "string",
"display_name": "string",
"discount_target": "string",
"discount_type": "string",
"discount_codes": [
"string"
],
"starts_at": 0,
"ends_at": 0
},
"entitled_customer": {
"customer_ids": [
"string"
],
"customer_segment_ids": [
"string"
]
},
"entitled_product": {
"product_ids": [
"string"
],
"variant_ids": [
"string"
],
"collection_ids": [
"string"
],
"sort": {
"by": "string",
"direction": "string"
},
"selection": "string",
"sku_extends": {}
},
"discount_rule": {
"limit_max_discount": 0,
"limit_user_discount": 0,
"limit_order_discount": 0,
"limit_code_max_discount": 0,
"limit_code_user_discount": 0,
"obtain_full": true,
"discount_combines": [
"string"
]
},
"discount_layer": {
"condition_type": "string",
"obtain_type": "string",
"layers": [
{
"condition_value": "string",
"obtain_value": "string",
"obtain_count": 0
}
]
},
"entitled_area": {
"areas": [
{
"country_code": "string",
"province_codes": [
"string"
]
}
]
},
"obtain_product": {
"product_ids": [
"string"
],
"variant_ids": [
"string"
],
"collection_ids": [
"string"
],
"sort": {
"by": "string",
"direction": "string"
},
"selection": "string",
"sku_extends": {}
}
}
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
product: 商品折扣order: 订单折扣shipping: 运费折扣buy_one_get_one: 买一赠一buy_x_get_y: 买 X 赠 Ybundle: 捆绑折扣rebate: 满减折扣m_n_discount: M 换 N 折扣flash_sale: 限时特卖code: 折扣码coupon_old: 旧版优惠券plugin_old: 旧版插件折扣rebate_old: 旧版满减cycle_subscribe_old: 旧版周期订购rebate_cta_otr: 满额固定减免rebate_ctq_otr: 满量固定减免rebate_cta_otp: 满额百分比折扣rebate_ctq_otp: 满量百分比折扣m_n_discount: M 换 N 折扣flashsale: 限时特卖折扣code_percent: 折扣码百分比折扣code_fix_price_reduction: 折扣码固定减免code_bxgy: 折扣码买 X 赠 Ycode_free_shipping: 折扣码免运费automatic: 自动应用discount_code: 折扣码触发ongoing: 进行中not_started: 未开始finished: 已结束paused: 已暂停entitled: 仅包含授权商品exclude: 排除授权商品all: 包含全部商品product: 同商品库存discount: 设置活动库存entitled: 仅包含授权商品exclude: 排除授权商品all: 包含全部商品product: 同商品库存discount: 设置活动库存no_limit: 不限制商品购买量customer_all_product: 每用户每折扣,所有符合条件的规格累计customer_product: 每用户每折扣每商品customer_variant: 每用户每折扣每规格product: 同商品库存discount: 设置活动库存price: 使用销售价格compare_at_price: 使用划线价/原始价格desc: 按商品价格降序应用asc: 按商品价格升序应用product: 可与商品折扣叠加order: 可与订单折扣叠加shipping: 可与运费折扣叠加highest: 仅应用最高匹配层all: 应用所有匹配层highest_all: 应用所有匹配层;超出最高层的数量按最高层优惠处理no_condition: 无条件限制purchase_quantity: 需满足购买数量purchase_amount: 需满足购买金额no_discount: 无折扣free_acquisition: 免费领取percent: 百分比折扣fixed_price_reduction: 固定金额减免fixed_price: 固定最终价格fixed_quantity: 固定数量领取product_price_reduction: 商品级价格减免- Array [
- ]
- Array [
- ]
错误码
错误信息
data object
discount object
折扣信息
discount_info object
折扣信息
折扣 ID
折扣名称
店铺前台展示名称
折扣目标类别:
折扣分类(顶层折扣类型):
折扣类型:
折扣方式:
折扣码
该折扣下的所有折扣码列表
开始日期
结束日期
开始时间
结束时间
创建时间(ISO-8601 格式)
最后更新时间(ISO-8601 格式)
是否为旧版折扣
当前进度状态:
是否对所有顾客启用
是否在管理后台显示
已使用次数
entitled_customer object
授权顾客
顾客 ID 列表
顾客分组 ID 列表
entitled_product object
授权商品
商品 ID 列表
规格 ID 列表
集合 ID 列表
sort object
排序配置
排序字段
排序方向
时间排序起始值(单位:秒),用于兼容旧版限时特卖
商品范围选择策略:
sku_extends object
规格扩展配置,以规格 ID 为键
property name* SkuExtendResp
领取值
最小购买数量
序列号
虚拟销量
活动库存是否跟随商品库存:
库存数量
集合 ID
obtain_product object
领取商品
商品 ID 列表
规格 ID 列表
集合 ID 列表
sort object
排序配置
排序字段
排序方向
时间排序起始值(单位:秒),用于兼容旧版限时特卖
商品范围选择策略:
sku_extends object
规格扩展配置,以规格 ID 为键
property name* SkuExtendResp
领取值
最小购买数量
序列号
虚拟销量
活动库存是否跟随商品库存:
库存数量
集合 ID
discount_rule object
折扣规则
折扣最大使用次数,-1 表示不限
每位顾客最大使用次数,-1 表示不限
每笔订单最大使用次数,-1 表示不限
每用户商品类型折扣上限:
每用户每商品折扣上限
库存数量
活动库存是否跟随商品库存:
虚拟销量
价格规则:
扩展列表
商品折扣排序:
折扣叠加配置列表:
是否已满额领取
多层折扣评估的范围策略:
每个折扣码最大使用次数,-1 表示不限。仅适用于非自动折扣
每位顾客每个折扣码最大使用次数,仅适用于非自动折扣
是否启用商品扩展信息
discount_layer object
折扣层级
条件类型:
领取类型:
layers object[]
层级列表
条件值
领取值
领取数量
discount_combine object
折扣叠加配置
是否可与其他折扣叠加
entitled_area object
授权地区
areas object[]
地区列表
国家代码(如 CN)
省份代码列表
{
"code": "string",
"message": "string",
"data": {
"discount": {
"discount_info": {
"id": "string",
"discount_name": "string",
"display_name": "string",
"discount_target": "string",
"category": "string",
"discount_type": "string",
"discount_method": "string",
"discount_code": "string",
"discount_codes": [
"string"
],
"starts_date": "string",
"ends_date": "string",
"starts_at": 0,
"ends_at": 0,
"created_at": "string",
"updated_at": "string",
"is_old_discount": true,
"progress": "string",
"enable_all_customer": true,
"is_show_admin": "string",
"time_used": 0
},
"entitled_customer": {
"customer_ids": [
"string"
],
"customer_segment_ids": [
"string"
]
},
"entitled_product": {
"product_ids": [
"string"
],
"variant_ids": [
"string"
],
"collection_ids": [
"string"
],
"sort": {
"by": "string",
"direction": "string",
"before": "string"
},
"selection": "string",
"sku_extends": {}
},
"obtain_product": {
"product_ids": [
"string"
],
"variant_ids": [
"string"
],
"collection_ids": [
"string"
],
"sort": {
"by": "string",
"direction": "string",
"before": "string"
},
"selection": "string",
"sku_extends": {}
},
"discount_rule": {
"limit_max_discount": 0,
"limit_user_discount": 0,
"limit_order_discount": 0,
"limit_user_product_type": "string",
"limit_user_product_discount": 0,
"stock": 0,
"follow_stock": "string",
"virtual_sales": 0,
"price_rule": "string",
"extends": "string",
"product_discount_order": "string",
"discount_combines": [
"string"
],
"obtain_full": true,
"mn_discount_scope": "string",
"limit_code_max_discount": 0,
"limit_code_user_discount": 0,
"enable_product_extends": true
},
"discount_layer": {
"condition_type": "string",
"obtain_type": "string",
"layers": [
{
"condition_value": "string",
"obtain_value": "string",
"obtain_count": 0
}
]
},
"discount_combine": {
"use_with_other": true
},
"entitled_area": {
"areas": [
{
"country_code": "string",
"province_codes": [
"string"
]
}
]
}
}
}
}