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

Ticket 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 amount constraint. Defaults to 0.

Example:

0

min_quantity
integer

Minimum quantity constraint. Defaults to 0.

Example:

0

max_quantity
integer

Maximum quantity constraint. Defaults to 0. Must be greater than or equal to min_quantity when both are provided.

Example:

0

max_uses
integer

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

Example:

0

max_products
integer

Maximum number of products that can be discounted with this code across all purchases. Defaults to 0.

Example:

0

event_id
string

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

Example:

"el4gr63f00xkq01i1d8jh5ohuzaZhvoE"

rate_ids
string[]

Ticket rate identifiers to associate with the discount code. Requires event_id.

Maximum array length: 100
Example:
single_use
boolean

Convenience flag. When true, forces max_products to 1 (single discounted product). 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