Ecommerce: Discounts
Create a discount
Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
post/api/ecommerce/v1/stores/{store_id}/discounts
Path parameters
store_idstring required
Example:store_01J8Z5F8W9K8M4A7B3C2D1E0FG
The ID of the store to create the discount for.
Request body
Example request
{
"code": "BLACKFRIDAY",
"name": "Black Friday",
"type": "percentage",
"value": 20,
"allocation": "total",
"starts_at": "2026-01-21T07:35:04.000000Z",
"ends_at": "2026-02-21T07:35:04.000000Z",
"usage_limit": 100,
"min_cart_value": 5000,
"time_zone": "Europe/Vilnius"
}Response
Created response
Example response
{
"data": {
"id": "disc_01J8Z5F8W9K8M4A7B3C2D1E0FG",
"code": "BLACKFRIDAY",
"name": "Black Friday",
"type": "percentage",
"value": 20,
"allocation": "total",
"starts_at": "2026-01-21T07:35:04.000000Z"
}
}Changes
Changed in 1 of the 88 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○