关于 折扣 ​
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
促销折扣是 Genstore 商家营销的核心组成部分,它提供了完整的折扣规则管理能力。通过该模块,商家可以配置折扣的触发规则和使用范围,包含满减条件、优惠金额、适用商品、使用限制等相关信息,实现精准的促销活动管理。
核心概念
- 折扣(Discount):价格优惠的具体配置,可按百分比或固定金额设置优惠额度。
- 触发器(Trigger):折扣生效的条件集合,包含以下核心要素:
- 订单金额:达到指定订单金额触发优惠。
- 商品范围:特定商品或商品集合可享受折扣。
- 使用条件:例如用户等级、使用次数等限制。
- 优惠类型:支持的折扣方式,如订单减免、运费优惠等。
核心功能
- 创建折扣:创建新的折扣规则和活动配置。
- 更新折扣:修改已有折扣的规则和配置信息。
- 删除折扣:移除指定的折扣活动配置。
- 查询折扣详情:获取折扣的具体规则和配置信息。
WARNING
折扣规则的变更会直接影响订单计价,修改前请谨慎评估其对现有订单的影响。
应用场景
- 促销活动管理:运营团队可设置满减优惠、免运费等促销规则,如订单满 $100 减 $10、订单超过 $100 免运费等。
- 折扣规则调整:商家可根据活动效果动态调整折扣策略,优化促销效果。
- 活动效果分析:运营团队可查询折扣配置和使用情况,评估促销活动的实际效果。
折扣 对象 ​
包含折扣触发条件的集合,当满足这些条件时,折扣将被激活。折扣触发后,会对商品价格或邮费进行相应的优惠扣减。可配置折扣名称、生效时间和结束时间等基本信息。
属性 ​
{
"discount": {
"promotionType": {
"categoryType": "PRODUCT_DISCOUNT",
"generateType": {
"discountCode": "71NLIYCH",
"generateDiscountType": "CODE_DISCOUNT"
},
"discountType": "PRICE_REDUCTION"
},
"discounts": {
"discountValueType": "FIXED_AMOUNT_OFF",
"value": "10"
},
"name": "My Discount Simple",
"startTime": "2024-11-11T10:05:19.421Z",
"trigger": {
"buyConditionValue": "10",
"scopeType": "SPECIFIC_PRODUCTS",
"usageSetting": {
"combinations": [
"PRODUCT",
"ORDER"
],
"customerOneUse": "false",
"customerScopeType": "ALL",
"discountCodeUseCount": "11"
},
"collectionList": {
"name": "Spring Collection",
"id": "1027"
},
"buyConditionType": "MINIMUM_NO",
"productList": [
{
"discountProductSkuLists": [
{
"id": "107362071756584"
}
],
"name": "shoes",
"id": "102744478756584"
}
]
},
"endTime": "2024-11-11T10:05:19.421Z",
"discountId": "1234123"
}
}
POST
新建折扣 ​
对折扣进行创建。
访问范围
需要以下任意访问权限: write_discounts
接口
POST
/api/202412/discounts
请求参数
响应数据
curl -X POST \
https://{shop}.genmystore.com/api/202412/discounts" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"discount":{
"promotionType":{
"categoryType":"PRODUCT_DISCOUNT",
"generateType":{
"discountCode":"71NLIYCH",
"generateDiscountType":"CODE_DISCOUNT"
},
"discountType":"PRICE_REDUCTION"
},
"discounts":{
"discountValueType":"FIXED_AMOUNT_OFF",
"value":"10"
},
"name":"My Discount Simple",
"startTime":"2024-11-11T10:05:19.421Z",
"trigger":{
"buyConditionValue":"10",
"scopeType":"SPECIFIC_PRODUCTS",
"freeShippingLimit":"12.6",
"usageSetting":{
"combinations":[
"PRODUCT",
"ORDER"
],
"customerOneUse":"false",
"customerScopeType":"ALL",
"discountCodeUseCount":"11",
"segments":[
{
"id":"123"
}
]
},
"collectionList":[
{
"id":"123"
}
],
"freeShippingCountryList":[
"OA",
"CN"
],
"buyConditionType":"MINIMUM_NO",
"productList":[
{
"discountProductSkuLists":[
{
"id":"107362071756584"
}
],
"id":"102744478756584"
}
]
},
"endTime":"2024-11-11T10:05:19.421Z"
}
}'
HTTP/1.1 200 OK
{
"discount": {
"promotionType": {
"categoryType": "PRODUCT_DISCOUNT",
"generateType": {
"discountCode": "71NLIYCH",
"generateDiscountType": "CODE_DISCOUNT"
},
"discountType": "PRICE_REDUCTION"
},
"discounts": {
"discountValueType": "FIXED_AMOUNT_OFF",
"value": "10"
},
"name": "My Discount Simple",
"startTime": "2024-11-11T10:05:19.421Z",
"trigger": {
"buyConditionValue": "10",
"freeShippingCountryList ": [
"OA",
"CN"
],
"scopeType": "SPECIFIC_PRODUCTS",
"freeShippingLimit": "12.6",
"usageSetting": {
"combinations": [
"PRODUCT",
"ORDER"
],
"customerOneUse": "false",
"customerScopeType": "ALL",
"discountCodeUseCount": "11",
"segments": [
{
"id": "123"
}
]
},
"collectionList": [
{
"id": "123"
}
],
"buyConditionType": "MINIMUM_NO",
"productList": [
{
"discountProductSkuLists": [
{
"id": "107362071756584"
}
],
"name": "shoes",
"id": "102744478756584"
}
]
},
"endTime": "2024-11-11T10:05:19.421Z",
"discountId": "21003695070100"
}
}
PUT
更新折扣 ​
对折扣进行编辑。
访问范围
需要以下任意访问权限: write_discounts
接口
PUT
/api/202412/discounts/{discountId}
请求参数
响应数据
curl -X PUT \
https://{shop}.genmystore.com/api/202412/discounts/{discountId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"discount":{
"promotionType":{
"categoryType":"PRODUCT_DISCOUNT",
"generateType":{
"discountCode":"71NLIYCH",
"generateDiscountType":"CODE_DISCOUNT"
},
"discountType":"PRICE_REDUCTION"
},
"discounts":{
"discountValueType":"FIXED_AMOUNT_OFF",
"value":"10"
},
"name":"My Discount Simple",
"startTime":"2024-11-11T10:05:19.421Z",
"trigger":{
"buyConditionValue":"10",
"scopeType":"SPECIFIC_PRODUCTS",
"freeShippingLimit":"12.6",
"usageSetting":{
"combinations":[
"PRODUCT",
"ORDER"
],
"customerOneUse":"false",
"customerScopeType":"ALL",
"discountCodeUseCount":"11",
"segments":[
{
"id":"123"
}
]
},
"collectionList":[
{
"id":"123"
}
],
"freeShippingCountryList":[
"OA",
"CN"
],
"buyConditionType":"MINIMUM_NO",
"productList":[
{
"discountProductSkuLists":[
{
"id":"107362071756584"
}
],
"name":"shoes",
"id":"102744478756584"
}
]
},
"endTime":"2024-11-11T10:05:19.421Z",
"discountId":"21003695070100"
}
}'
HTTP/1.1 200 OK
{
"discount": {
"promotionType": {
"categoryType": "PRODUCT_DISCOUNT",
"generateType": {
"discountCode": "71NLIYCH",
"generateDiscountType": "CODE_DISCOUNT"
},
"discountType": "PRICE_REDUCTION"
},
"discounts": {
"discountValueType": "FIXED_AMOUNT_OFF",
"value": "10"
},
"name": "My Discount Simple",
"startTime": "2024-11-11T10:05:19.421Z",
"trigger": {
"buyConditionValue": "10",
"scopeType": "SPECIFIC_PRODUCTS",
"freeShippingLimit": "12.6",
"usageSetting": {
"combinations": [
"PRODUCT",
"ORDER"
],
"customerOneUse": "false",
"customerScopeType": "ALL",
"discountCodeUseCount": "11",
"segments": [
{
"id": "123"
}
]
},
"collectionList": [
{
"id": "123"
}
],
"freeShippingCountryList": [
"OA",
"CN"
],
"buyConditionType": "MINIMUM_NO",
"productList": [
{
"discountProductSkuLists": [
{
"id": "107362071756584"
}
],
"name": "shoes",
"id": "102744478756584"
}
]
},
"endTime": "2024-11-11T10:05:19.421Z",
"discountId": "21003695070100"
}
}
PUT
更新折扣活动状态 ​
激活或失效折扣活动状态。
访问范围
需要以下任意访问权限: write_discounts
接口
PUT
/api/202412/discounts/{discountId}/status
请求参数
响应数据
curl -X PUT \
https://{shop}.genmystore.com/api/202412/discounts/{discountId}/status" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"discount":{
"operateType":"INACTIVE"
}
}'
HTTP/1.1 200 OK
{
"discount": {
"name": "My Discount Simple",
"discountId": "21003695070100",
"status": "RUN"
}
}
DELETE
删除折扣 ​
删除已创建的折扣。
访问范围
需要以下任意访问权限: write_discounts
接口
DELETE
/api/202412/discounts/{discountId}
请求参数
响应数据
curl -X DELETE \
https://{shop}.genmystore.com/api/202412/discounts/{discountId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{}
GET
获取折扣详情 ​
对折扣进行查询。
访问范围
需要以下任意访问权限: write_discounts
read_discounts
接口
GET
/api/202412/discounts/{discountId}
请求参数
响应数据
curl -X GET \
https://{shop}.genmystore.com/api/202412/discounts/{discountId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"discount": {
"promotionType": {
"categoryType": "PRODUCT_DISCOUNT",
"generateType": {
"discountCode": "71NLIYCH",
"generateDiscountType": "CODE_DISCOUNT"
},
"discountType": "PRICE_REDUCTION"
},
"discounts": {
"discountValueType": "FIXED_AMOUNT_OFF",
"value": "10"
},
"name": "My Discount Simple",
"startTime": "2024-11-11T10:05:19.421Z",
"trigger": {
"buyConditionValue": "10",
"scopeType": "SPECIFIC_PRODUCTS",
"usageSetting": {
"combinations": [
"PRODUCT",
"ORDER"
],
"customerOneUse": "false",
"customerScopeType": "ALL",
"discountCodeUseCount": "11"
},
"collectionList": [
{
"id": "123"
}
],
"buyConditionType": "MINIMUM_NO",
"productList": [
{
"discountProductSkuLists": [
{
"id": "107362071756584"
}
],
"name": "shoes",
"id": "102744478756584"
}
]
},
"endTime": "2024-11-11T10:05:19.421Z",
"discountId": "21003695070100",
"status": "RUN"
}
}
GET
获取折扣列表 ​
查询折扣活动列表。
访问范围
需要以下任意访问权限: write_discounts
read_discounts
接口
GET
/api/202412/discounts
请求参数
响应数据
curl -X GET \
https://{shop}.genmystore.com/api/202412/discounts" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"discounts": [
{
"categoryType": "PRODUCT_DISCOUNT",
"discountCode": "DYXYAB",
"name": "Discount A",
"discountType": "PRICE_REDUCTION",
"startTime": "2024-11-11T10:05:19.421Z",
"endTime": "2024-11-11T10:06:19.421Z",
"discountId": "21003695070100",
"status": "NOT_RUN",
"generateDiscountType": "CODE_DISCOUNT"
}
]
}
关于 折扣
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
促销折扣是 Genstore 商家营销的核心组成部分,它提供了完整的折扣规则管理能力。通过该模块,商家可以配置折扣的触发规则和使用范围,包含满减条件、优惠金额、适用商品、使用限制等相关信息,实现精准的促销活动管理。
核心概念
- 折扣(Discount):价格优惠的具体配置,可按百分比或固定金额设置优惠额度。
- 触发器(Trigger):折扣生效的条件集合,包含以下核心要素:
- 订单金额:达到指定订单金额触发优惠。
- 商品范围:特定商品或商品集合可享受折扣。
- 使用条件:例如用户等级、使用次数等限制。
- 优惠类型:支持的折扣方式,如订单减免、运费优惠等。
核心功能
- 创建折扣:创建新的折扣规则和活动配置。
- 更新折扣:修改已有折扣的规则和配置信息。
- 删除折扣:移除指定的折扣活动配置。
- 查询折扣详情:获取折扣的具体规则和配置信息。
WARNING
折扣规则的变更会直接影响订单计价,修改前请谨慎评估其对现有订单的影响。
应用场景
- 促销活动管理:运营团队可设置满减优惠、免运费等促销规则,如订单满 $100 减 $10、订单超过 $100 免运费等。
- 折扣规则调整:商家可根据活动效果动态调整折扣策略,优化促销效果。
- 活动效果分析:运营团队可查询折扣配置和使用情况,评估促销活动的实际效果。
折扣 对象
包含折扣触发条件的集合,当满足这些条件时,折扣将被激活。折扣触发后,会对商品价格或邮费进行相应的优惠扣减。可配置折扣名称、生效时间和结束时间等基本信息。
属性
POST
新建折扣
对折扣进行创建。
访问范围
需要以下任意访问权限: write_discounts
接口
POST
/api/202412/discounts
PUT
更新折扣
对折扣进行编辑。
访问范围
需要以下任意访问权限: write_discounts
接口
PUT
/api/202412/discounts/{discountId}
PUT
更新折扣活动状态
激活或失效折扣活动状态。
访问范围
需要以下任意访问权限: write_discounts
接口
PUT
/api/202412/discounts/{discountId}/status
DELETE
删除折扣
删除已创建的折扣。
访问范围
需要以下任意访问权限: write_discounts
接口
DELETE
/api/202412/discounts/{discountId}
GET
获取折扣详情
对折扣进行查询。
访问范围
需要以下任意访问权限: write_discounts
read_discounts
接口
GET
/api/202412/discounts/{discountId}
GET
获取折扣列表
查询折扣活动列表。
访问范围
需要以下任意访问权限: write_discounts
read_discounts
接口
GET
/api/202412/discounts