🚀 New: Theme Control Plane API — build, customize, and deploy themes programmatically. Learn more →
curl --request POST \
--url https://api.shoppex.io/dev/v1/coupons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "SAVE10",
"discount_value": 10,
"discount_type": "PERCENTAGE",
"max_uses": 100,
"products_bound": [
"prod_1"
],
"min_order_amount": 20,
"max_discount": 50,
"valid_from": "2026-04-01T00:00:00.000Z",
"valid_until": "2026-05-01T00:00:00.000Z"
}
'{
"data": {
"id": "coupon_db_1",
"uniqid": "coupon_1",
"shop_id": "shop_1",
"type": "PERCENTAGE",
"code": "save10",
"discount": 10,
"used": 0,
"max_uses": 100,
"min_order_amount": 20,
"max_discount": 50,
"valid_from": 1711929600,
"valid_until": 1714521600,
"is_active": true,
"created_at": 1711929600,
"updated_at": 1711929600,
"products_bound": [
"prod_1"
],
"products_count": 1
}
}Creates a coupon for the authenticated shop.
curl --request POST \
--url https://api.shoppex.io/dev/v1/coupons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "SAVE10",
"discount_value": 10,
"discount_type": "PERCENTAGE",
"max_uses": 100,
"products_bound": [
"prod_1"
],
"min_order_amount": 20,
"max_discount": 50,
"valid_from": "2026-04-01T00:00:00.000Z",
"valid_until": "2026-05-01T00:00:00.000Z"
}
'{
"data": {
"id": "coupon_db_1",
"uniqid": "coupon_1",
"shop_id": "shop_1",
"type": "PERCENTAGE",
"code": "save10",
"discount": 10,
"used": 0,
"max_uses": 100,
"min_order_amount": 20,
"max_discount": 50,
"valid_from": 1711929600,
"valid_until": 1714521600,
"is_active": true,
"created_at": 1711929600,
"updated_at": 1711929600,
"products_bound": [
"prod_1"
],
"products_count": 1
}
}Use your Shoppex API key in the Authorization header.
1 - 64x >= 1e-9PERCENTAGE Successful response
Show child attributes