v1
latestOpenAPI 3.0.02026-07-2475182625.5 KBCoupons
Create or update a coupon
Creates a new coupon or updates an existing one. The operation is determined automatically based on whether the coupon path identifier already exists — no separate update endpoint is required.
The action field in the response confirms which operation was performed: coupon.create or coupon.update.
Warning: Including the codes array in an update request permanently replaces all existing codes. Omit the codes field to preserve existing codes.
post/coupons
Request body
Example request
{
"coupon": "summer-sale-2026",
"orderLevelDiscount": true,
"discount": {
"type": "percent",
"percent": 25,
"amount": {
"USD": 10,
"EUR": 9,
"GBP": 8
}
},
"discounts": [
{
"type": "percent",
"percent": 50,
"products": [
"pro-plan-annual"
],
"discountPeriodCount": 3,
"applyDiscountImmediately": true
},
{
"type": "percent",
"percent": 25,
"products": [
"pro-plan-monthly"
],
"discountPeriodCount": 6,
"applyDiscountImmediately": false
}
],
"discountPeriodCount": 3,
"applyDiscountImmediately": true,
"autoSelectDiscount": true,
"reason": {
"en": "50% off for your first 3 months",
"de": "50% Rabatt für die ersten 3 Monate"
},
"limit": 500,
"available": {
"start": "2026-06-01",
"end": "2026-08-31"
},
"codes": [
"SUMMER10",
"SUMMER20"
],
"products": [
"pro-plan-monthly",
"pro-plan-annual"
]
}Response
Returned for both successful operations and validation errors. Always check the result field to determine the outcome.
Example response
{
"coupon": "summer-sale-2026",
"action": "coupon.create",
"result": "success"
}