Skip to main content
POST
cURL

Authorizations

integration_id
string
header
required

Identifier of the integration (Auth v1)

secret
string
header
required

Secret of the organization (Auth v1)

x-api-key
string
header
required

API key (Auth v2)

Body

application/json

Booking discount code to create.

code
string

Discount code value. Trimmed and normalized to uppercase before saving (codes are case-insensitive). Must not contain "/". Maximum 50 characters. Optional: when omitted, a unique code is auto-generated.

Example:

"SUMMER20"

description
string

Discount code description.

Example:

"Summer promotion"

active
boolean

Whether the discount code is active. Defaults to true.

Example:

true

fixed_amount
number

Fixed discount amount. Defaults to 0.

Example:

0

percentage
number

Percentage discount between 0 and 100. Defaults to 0. Cannot be greater than 0 when fixed_amount is greater than 0.

Required range: 0 <= x <= 100
Example:

20

min_amount
number

Minimum booking price required to apply the discount. Defaults to 0.

Example:

0

max_uses
integer

Maximum number of times (transactions) the discount code can be used. Defaults to 0.

Example:

0

event_id
string

Event identifier. When omitted, the discount code is created at organization level.

Example:

"el4gr63f00xkq01i1d8jh5ohuzaZhvoE"

single_use
boolean

Convenience flag. When true, forces max_uses to 1 (single redemption). Defaults to false.

Example:

false

expires_at
string<date-time>

Expiration date in ISO 8601 format. Must be a valid future date. Optional; when omitted the discount code does not expire.

Example:

"2026-12-31T23:59:59.000Z"

Response

HTTP Created

success
boolean
Example:

true

data
object