On this page6 sections
POST/api/promotions/create-promotionPromotionsPermission: promotion.create
Create Promotion
Creates a new percentage, nominal, or tiered-quantity promotion in the active tenant.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Request
Provide the following fields in the request payload.
namestringrequired
name parameter.
typestringrequired
type parameter.
valuenumber | nullrequired
value parameter.
descriptionstring | nulloptional
description parameter.
displayStylestring | nulloptional
display Style parameter.
productIdsarray<string (uuid)>optional
product Ids parameter.
categoriesarray<string>optional
categories parameter.
isActivebooleanoptionaldefault: true
is Active parameter.
minQuantityinteger | nulloptional
min Quantity parameter.
tiersobject | nulloptional
tiers parameter.
Responses
Select a status code to inspect schema.
Created — Promotion created successfully.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/promotions/create-promotion
curl -X POST "https://api.invoger.com/api/promotions/create-promotion" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "name": "Afternoon Coffee 15%", "type": "PERCENTAGE", "value": 15, "categories": [ "Beverages" ], "isActive": true }'Interactive playground
Response
application/json
{
"success": true,
"message": "Promotion created successfully",
"data": {
"id": "p1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c",
"name": "Afternoon Coffee 15%"
}
}