About Discount ​
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Genstore's discount system helps merchants create and manage promotional offers. It lets you define triggers, set discount rules, and control how customers save on purchases. This module handles everything from simple dollar-off deals to complex multi-product promotions.
Core Concepts
- Discount: Price reduction configuration that can be set as a percentage or fixed amount
- Trigger: Set of conditions that activate a discount, including:
- Order Amount: Discount activates when order reaches specified amount.
- Product Scope: Specific products or collections eligible for discount.
- Usage Rules: Restrictions like user tier or usage limits.
- Discount Types: Supported discount formats, such as order discounts or shipping fee reductions.
Core Features
- Create Discount: Set up new discount rules and promotion configurations.
- Update Discount: Modify existing discount rules and settings.
- Delete Discount: Remove specified discount promotion.
- Query Discount Details: Retrieve specific discount rules and settings.
WARNING
Review the impact on current orders before modifying active discounts, as changes affect pricing immediately.
Use Cases
- Promotion Management: Operations teams can set up purchase discounts and free shipping rules, such as "$10 off orders over $100" or "Free shipping on orders over $100".
- Discount Adjustment: Merchants can dynamically adjust discount strategies based on promotion performance.
- Performance Analysis: Operations teams can review discount configurations and usage to evaluate promotion effectiveness.
Endpoints
POST
/api/202412/discounts: Create discount
PUT
/api/202412/discounts/{discountId}: Update discount
PUT
/api/202412/discounts/{discountId}/status: Update discount status
DELETE
/api/202412/discounts/{discountId}: Delete discount
GET
/api/202412/discounts/{discountId}: Get discount details
GET
/api/202412/discounts: Query discount
Discount Object ​
The discount includes a set of applicable conditions, specifying the circumstances under which the discount is triggered or activated, referred to as the discount trigger. Once the applicable conditions are met, the discount can be applied to product prices, shipping fees, or other charges. Additionally, you can configure details such as the discount name, start time, and end time.
Properties ​
{
"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
Create discount ​
Create a discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
POST
/api/202412/discounts
Request Params
Response Data
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
Update discount ​
Edit the discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
PUT
/api/202412/discounts/{discountId}
Request Params
Response Data
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
Update discount status ​
Activate or deactivate the discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
PUT
/api/202412/discounts/{discountId}/status
Request Params
Response Data
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
Delete discount ​
Delete the created discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
DELETE
/api/202412/discounts/{discountId}
Request Params
Response Data
curl -X DELETE \
https://{shop}.genmystore.com/api/202412/discounts/{discountId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{}
GET
Get discount details ​
Query for discount details.
Access scope
Requires ANY of the following access scopes: write_discounts
read_discounts
Endpoint
GET
/api/202412/discounts/{discountId}
Request Params
Response Data
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
Query discount ​
Query discount list.
Access scope
Requires ANY of the following access scopes: write_discounts
read_discounts
Endpoint
GET
/api/202412/discounts
Request Params
Response Data
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"
}
]
}
About Discount
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Genstore's discount system helps merchants create and manage promotional offers. It lets you define triggers, set discount rules, and control how customers save on purchases. This module handles everything from simple dollar-off deals to complex multi-product promotions.
Core Concepts
- Discount: Price reduction configuration that can be set as a percentage or fixed amount
- Trigger: Set of conditions that activate a discount, including:
- Order Amount: Discount activates when order reaches specified amount.
- Product Scope: Specific products or collections eligible for discount.
- Usage Rules: Restrictions like user tier or usage limits.
- Discount Types: Supported discount formats, such as order discounts or shipping fee reductions.
Core Features
- Create Discount: Set up new discount rules and promotion configurations.
- Update Discount: Modify existing discount rules and settings.
- Delete Discount: Remove specified discount promotion.
- Query Discount Details: Retrieve specific discount rules and settings.
WARNING
Review the impact on current orders before modifying active discounts, as changes affect pricing immediately.
Use Cases
- Promotion Management: Operations teams can set up purchase discounts and free shipping rules, such as "$10 off orders over $100" or "Free shipping on orders over $100".
- Discount Adjustment: Merchants can dynamically adjust discount strategies based on promotion performance.
- Performance Analysis: Operations teams can review discount configurations and usage to evaluate promotion effectiveness.
Discount Object
The discount includes a set of applicable conditions, specifying the circumstances under which the discount is triggered or activated, referred to as the discount trigger. Once the applicable conditions are met, the discount can be applied to product prices, shipping fees, or other charges. Additionally, you can configure details such as the discount name, start time, and end time.
Properties
POST
Create discount
Create a discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
POST
/api/202412/discounts
PUT
Update discount
Edit the discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
PUT
/api/202412/discounts/{discountId}
PUT
Update discount status
Activate or deactivate the discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
PUT
/api/202412/discounts/{discountId}/status
DELETE
Delete discount
Delete the created discount.
Access scope
Requires ANY of the following access scopes: write_discounts
Endpoint
DELETE
/api/202412/discounts/{discountId}
GET
Get discount details
Query for discount details.
Access scope
Requires ANY of the following access scopes: write_discounts
read_discounts
Endpoint
GET
/api/202412/discounts/{discountId}
GET
Query discount
Query discount list.
Access scope
Requires ANY of the following access scopes: write_discounts
read_discounts
Endpoint
GET
/api/202412/discounts