Skip to main content
POST
https://api2.ecomailapp.cz
/
coupons
/
import
curl -X POST https://api2.ecomailapp.cz/coupons/import \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "folderId": 1,
    "codes": ["kod1", "kod2", "kod3", "kod4"],
    "valid_until": "2025-12-31",
    "update_existing": false
  }'
{
  "imported": 4,
  "duplicated": 0,
  "totalCount": 4
}
folderId
integer
Folder ID. If not provided, coupons are imported into the default folder.
codes
array
required
Array of coupon code strings.
valid_until
string
Expiration date in YYYY-MM-DD format.
update_existing
boolean
default:"false"
Update existing coupons if they already exist.
curl -X POST https://api2.ecomailapp.cz/coupons/import \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "folderId": 1,
    "codes": ["kod1", "kod2", "kod3", "kod4"],
    "valid_until": "2025-12-31",
    "update_existing": false
  }'
{
  "imported": 4,
  "duplicated": 0,
  "totalCount": 4
}