curl --request POST \
--url https://app.tagadapay.com/api/public/v1/promotion-codes/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "SUMMER20",
"promotionId": "promo_123",
"usageLimit": 100,
"expiresAt": "2025-08-31T23:59:59.000Z",
"firstTimeCustomersOnly": false,
"description": "Summer sale 20% off code"
}
'{
"id": "pc_123",
"code": "SUMMER20",
"promotionId": "promo_123",
"storeId": "store_123",
"active": true,
"usageCount": 0,
"usageLimit": 100,
"firstTimeCustomersOnly": false,
"expiresAt": "2025-08-31T23:59:59.000Z"
}Create a new promotion code linked to an existing promotion
curl --request POST \
--url https://app.tagadapay.com/api/public/v1/promotion-codes/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "SUMMER20",
"promotionId": "promo_123",
"usageLimit": 100,
"expiresAt": "2025-08-31T23:59:59.000Z",
"firstTimeCustomersOnly": false,
"description": "Summer sale 20% off code"
}
'{
"id": "pc_123",
"code": "SUMMER20",
"promotionId": "promo_123",
"storeId": "store_123",
"active": true,
"usageCount": 0,
"usageLimit": 100,
"firstTimeCustomersOnly": false,
"expiresAt": "2025-08-31T23:59:59.000Z"
}Enter your API key as: Bearer your-api-key
Successful response