Skip to content

REST API v2. Authenticate with a Bearer JWT in the Authorization header unless an endpoint is marked public.

Servers​

https://v2-staging.tscheckout.comCurrent host

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"
events

Filter to promo codes limited to any of these event ids (comma-separated).

Type
string
Example"1,2"
ticketTypes

Filter to promo codes limited to any of these ticket type ids (comma-separated).

Type
string
Example"10,11"
waveTimes

Filter to promo codes limited to any of these wave time ids (comma-separated).

Type
string
Example"5,6"
codeGroup

Exact match on code group (codeGroup).

Type
string
Example"General"
affiliate

Exact match on linked affiliate id (promoter).

Type
integer
Example12
Format
"int64"
from

Promos with activeFrom on or after this instant (PHP strtotime string, e.g. 2025-06-01 or 2025-06-01 09:00:00).

Type
string
Example"2025-06-01"
to

Promos with activeTo on or before end of that day (or the given time if included).

Type
string
Example"2025-12-31"
pass

Exact match on passId (access pass). Use 0 for none.

Type
integer
Example0
Format
"int64"
expired

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

Type
boolean
Examplefalse
Default
false

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​


List distinct promo code groups​

GET
/api/v2/promo-codes/code-groups

Returns unique codeGroup values from non-deleted promos (excluding stored-value codes), sorted alphabetically. Same scope as GET /promo-codes.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Responses​

Distinct code groups

application/json
JSON
"string"

Playground​

Authorization

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​


Duplicate promo code​

POST
/api/v2/promo-codes/{id}/duplicate

Duplicate a promo code and its relation limits (events, ticket types, wave times, tags, tag price pairs). Requires a new unique code; any other create field may be overridden in the body. Does not copy passId/transferTicketId or usage counters (matches admin promo code duplicate).

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Source promo code ID to duplicate

Type
integer
Required
Format
"int64"

Request Body​

application/json
JSON
"string"

Responses​

Promo code duplicated

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 /api/v2/promo-code/​

GET
/api/v2/promo-code/

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

_search

Limit to results matching this search string

Type
string
_limit

Limit results

Type
integer
Format
"int64"
_offset

Offset results

Type
integer
Format
"int64"
code

Code to search for

Type
integer
Format
"int64"
expired

Expired flag

Type
integer
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


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

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

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*
Type
integer
Required
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


Create a new Promo Code​

POST
/api/v2/promo-code

Creates a new promoCode from the data POSTed

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
"string"

Responses​

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