curl --request POST \
--url https://api.cloud.flexprice.io/v1/coupons \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount_off": 123,
"cadence": "once",
"currency": "<string>",
"duration_in_periods": 123,
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percentage_off": 123,
"redeem_after": "<string>",
"redeem_before": "<string>",
"rules": {},
"type": "fixed"
}'
{
"amount_off": 123,
"cadence": "once",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"duration_in_periods": 123,
"environment_id": "<string>",
"id": "<string>",
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percentage_off": 123,
"redeem_after": "<string>",
"redeem_before": "<string>",
"rules": {},
"status": "published",
"tenant_id": "<string>",
"total_redemptions": 123,
"type": "fixed",
"updated_at": "<string>",
"updated_by": "<string>"
}
Creates a new coupon
curl --request POST \
--url https://api.cloud.flexprice.io/v1/coupons \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount_off": 123,
"cadence": "once",
"currency": "<string>",
"duration_in_periods": 123,
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percentage_off": 123,
"redeem_after": "<string>",
"redeem_before": "<string>",
"rules": {},
"type": "fixed"
}'
{
"amount_off": 123,
"cadence": "once",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"duration_in_periods": 123,
"environment_id": "<string>",
"id": "<string>",
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percentage_off": 123,
"redeem_after": "<string>",
"redeem_before": "<string>",
"rules": {},
"status": "published",
"tenant_id": "<string>",
"total_redemptions": 123,
"type": "fixed",
"updated_at": "<string>",
"updated_by": "<string>"
}
Enter your API key in the format x-api-key <api-key>*
Coupon request
The body is of type object
.
Created
The response is of type object
.