Skip to content

Get a list of promo codes​

GET
/api/v2/promo-codes

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

status

Filter by status

Type
string
Valid values
"active""inactive""soldOut""expired"
Example"active"
type

Filter by type

Type
string
Valid values
"specific""percentage""flat""specificTag"
Example"percentage"

Responses​

Promo code list

application/json
JSON
{
  
"count": 10,
  
"totalCount": 25,
  
"limit": 50,
  
"offset": 25,
  
"data": [
  
]
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create promo code​

POST
/api/v2/promo-codes

Create promo code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
"string"

Responses​

Promo code created

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Body

Samples​


Get promo code by ID​

GET
/api/v2/promo-codes/{id}

Return a single promo code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Promo code ID

Type
integer
Required
Format
"int64"

Responses​

Promo code

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Delete promo code​

DELETE
/api/v2/promo-codes/{id}

Soft delete promo code by URL path id

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Promo code ID

Type
integer
Required
Format
"int64"

Responses​

Promo code deleted

Playground​

Authorization
Variables
Key
Value

Samples​


Update promo code​

PATCH
/api/v2/promo-codes/{id}

Update promo code by id in request body

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Promo code ID

Type
integer
Required
Format
"int64"

Request Body​

application/json
JSON
"string"

Responses​

Promo code updated

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Bulk delete promo codes​

POST
/api/v2/promo-codes/bulk-delete

Soft delete multiple promo codes

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"ids": [
  
  
[
  
  
  
1,
  
  
  
2,
  
  
  
3
  
  
]
  
]
}

Responses​

Promo codes deleted

Playground​

Authorization
Body

Samples​


Upload promo code import file (step 1)​

POST
/api/v2/promo-codes/import/upload

Upload CSV/TXT for a two-step import. Returns importId, column headers or synthetic names, preview rows, and row count. File is stored in private storage until confirm or expiry.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

multipart/form-data
object

CSV or TXT file

Format"binary"

Treat first row as column headers

Defaultfalse

Max preview rows (1–100)

Default20

Responses​

Upload result

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Body

Samples​


Confirm promo code import (step 2)​

POST
/api/v2/promo-codes/import/{importId}/confirm

Apply column mapping and defaults, create or optionally update promo codes (or stored value codes when defaults.type is "storedValue") from the staged CSV. If any row fails (failed > 0), the upload session is kept so you can call confirm again with the same importId (e.g. set overwriteDuplicate to true after duplicate errors). On full success (failed === 0), the staged file and session are removed.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

importId*

Session id returned by POST /api/v2/promo-codes/import/upload

Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
"string"

Responses​

Import result

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Export filtered promo codes to CSV (zipped)​

GET
/api/v2/promo-codes/export

Creates a UTF-8 CSV inside a ZIP, uploads to private storage, and optionally emails a Global Export Manager download link. Filters mirror v1 promoCodeManager apiExportCsv: search on code and codeGroup, expired toggles rows with activeTo before now versus on or after now, excludes storedValue types.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

search

Search text (code and codeGroup).

Type
string
Example"SUMMER"
expired

If true, rows where activeTo < now; if false, activeTo >= now. Omit or false for active export.

Type
boolean
Examplefalse
Default
false
emailAddress

Recipient for download link email; if omitted, v1-style defaults apply.

Type
string
Example"reports@example.com"
Format
"email"

Responses​

Export created; use downloadUrlPath with site origin or email link

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Get a list of promo codes​

GET
/api/v2/promo-codes

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

status

Filter by status

Type
string
Valid values
"active""inactive""soldOut""expired"
Example"active"
type

Filter by type

Type
string
Valid values
"specific""percentage""flat""specificTag"
Example"percentage"

Responses​

Promo code list

application/json
JSON
{
  
"count": 10,
  
"totalCount": 25,
  
"limit": 50,
  
"offset": 25,
  
"data": [
  
]
}

Playground​

Authorization
Variables
Key
Value

Samples​


Get promo code by ID​

GET
/api/v2/promo-codes/{id}

Return a single promo code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Promo code ID

Type
integer
Required
Format
"int64"

Responses​

Promo code

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create promo code​

POST
/api/v2/promo-codes

Create promo code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
"string"

Responses​

Promo code created

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Body

Samples​


GET /api/v2/promo-code/{id}/applies-to-ticket-type​

GET
/api/v2/promo-code/{id}/applies-to-ticket-type

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

ID of promo code to use

Type
integer
Required
Format
"int64"

Query Parameters

typeId

Ticket type to test

Type
integer
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


GET /api/v2/promo-code/{id}/calculate-discount​

GET
/api/v2/promo-code/{id}/calculate-discount

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

ID of promo code to use

Type
integer
Required
Format
"int64"

Query Parameters

typeId

Ticket type to apply discount to

Type
integer
Format
"int64"
price

Original price

Type
number
Format
"float"
appliedAmount

Already applied amount

Type
integer
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


Powered by VitePress OpenAPI