Skip to main content
POST
/
ecommerce
/
v2
/
apps
/
{app_id}
/
coupons
curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/coupons" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "BLACKFRIDAY25",
    "name": "Black Friday 25%",
    "description": "25% off the entire store",
    "discount_type": "percentage",
    "discount_value": 25,
    "status": true,
    "valid_from": "2026-11-25T00:00:00Z",
    "valid_until": "2026-11-30T23:59:59Z",
    "max_uses": 100,
    "once_per_client": true,
    "applies_to_all_branches": true
  }'
{
  "data": {
    "id": "9e3f2c1a-8b7d-4e6f-a5c4-d3b2a1e0f9c8",
    "app_id": "1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
    "code": "BLACKFRIDAY25",
    "name": "Black Friday 25%",
    "description": "25% off the entire store",
    "discount_type": "percentage",
    "discount_value": "25.000000",
    "status": true,
    "valid_from": "2026-11-25T00:00:00.000000Z",
    "valid_until": "2026-11-30T23:59:59.000000Z",
    "max_uses": 100,
    "once_per_client": true,
    "applies_to_all_branches": true,
    "state": "scheduled",
    "created_at": "2026-07-02T15:30:00.000000Z",
    "updated_at": "2026-07-02T15:30:00.000000Z"
  }
}
app_id
string
required
Your store ID in Jelou Shop.
code
string
required
Code the customer enters at checkout (max. 255 characters).
name
string
required
Internal coupon name (max. 255 characters).
description
string
Optional coupon description (max. 1000 characters).
discount_type
string
required
Discount type. Values: percentage or value (fixed amount).
discount_value
number
required
Discount value. For percentage it is a value between 0 and 100; for value it is a fixed amount in the store currency.
status
boolean
default:"true"
Whether the coupon is active. An inactive coupon cannot be applied.
valid_from
string
Validity start date/time (ISO 8601). If omitted, the coupon is valid from creation.
valid_until
string
Validity end date/time (ISO 8601). Must be equal to or later than valid_from. If omitted, it never expires.
max_uses
integer
Total usage limit for the coupon (minimum 1). If omitted, usage is unlimited.
once_per_client
boolean
default:"false"
If true, each customer can use the coupon only once.
applies_to_all_branches
boolean
default:"false"
If true, the coupon applies to all branches and branches is ignored. If false, it only applies to the branches listed in branches.
branches
object[]
Branches where the coupon applies (only when applies_to_all_branches is false).
The code must be unique within its branch scope. You cannot create two coupons with the same code if they share a branch (or if either applies to all branches). A percentage discount cannot exceed 100.
curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/coupons" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "BLACKFRIDAY25",
    "name": "Black Friday 25%",
    "description": "25% off the entire store",
    "discount_type": "percentage",
    "discount_value": 25,
    "status": true,
    "valid_from": "2026-11-25T00:00:00Z",
    "valid_until": "2026-11-30T23:59:59Z",
    "max_uses": 100,
    "once_per_client": true,
    "applies_to_all_branches": true
  }'
{
  "data": {
    "id": "9e3f2c1a-8b7d-4e6f-a5c4-d3b2a1e0f9c8",
    "app_id": "1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
    "code": "BLACKFRIDAY25",
    "name": "Black Friday 25%",
    "description": "25% off the entire store",
    "discount_type": "percentage",
    "discount_value": "25.000000",
    "status": true,
    "valid_from": "2026-11-25T00:00:00.000000Z",
    "valid_until": "2026-11-30T23:59:59.000000Z",
    "max_uses": 100,
    "once_per_client": true,
    "applies_to_all_branches": true,
    "state": "scheduled",
    "created_at": "2026-07-02T15:30:00.000000Z",
    "updated_at": "2026-07-02T15:30:00.000000Z"
  }
}
Per-branch coupon: send applies_to_all_branches: false and a branches list. Each branch can have its own max_uses and status.
{
  "code": "CENTRO20",
  "name": "Downtown 20%",
  "discount_type": "percentage",
  "discount_value": 20,
  "applies_to_all_branches": false,
  "branches": [
    { "id": "1a2b3c4d-...", "max_uses": 50, "status": true }
  ]
}