Skip to content

Reference

Codes

Promo codes (discounts) and access codes (unlock hidden items).

View as Markdown

Every operation below is also in the OpenAPI document. One that names an MCP tool can be called through the MCP server; one that names none cannot.

List codes#

GET /v1/codes

Operation id listCodes. MCP tool list_codes. SDK tickets.codes.list.

Promo codes (discounts) and access codes (unlock hidden items), with how many times each was used. The text of a code is null for a read key or a viewer. Finding a code by its text is POST /v1/codes/search, so a code never goes in a URL. origin=explicit lists the codes made one at a time, and origin=batch those a batch made: a batch can be thousands of codes, so read it by page.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has read (owner, admin, staff, viewer).

ParameterInTypeDescription
limitqueryintegerHow many to return, 1 to 100 (default 20).
starting_afterquerystringAn id from the page before: the page after it.
ending_beforequerystringAn id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other…
eventquerystringAn id starting with evt_.
partnerquerystringAn id starting with ptr_.
activequery"true" | "false"
originquery"explicit" | "batch"explicit: codes made one at a time. batch: codes made by a code batch. Goes with event and no other filter.

Answers 200. A page of codes with their use counts. The text of a code is null for a read key or a viewer. To find a code by its text use POST /v1/codes/search: a code in a URL is kept in logs.

Fields

FieldTypeDescription
object *"list"
data *array of CodeAsReadThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *"/v1/codes"The path this list came from (/v1/codes).

* required

Make a promo or access code#

POST /v1/codes

Operation id createCode. MCP tool create_code. SDK tickets.codes.create.

Makes a promo code (a discount), an access code (unlocks hidden ticket types or add-ons), or both. The same text cannot be used twice in an event, ignoring case (code_already_exists). The code text goes in the body, never a URL. For thousands of single-use codes, use POST /v1/events/{id}/code_batches.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has catalog.write (owner, admin, staff).

Request body (CreateCodeInput)

FieldTypeDescription
event *stringAn id starting with evt_.
code *stringA promo or access code as typed; case does not matter.
descriptionstring
discountDiscount | null
applies_to"all" | array of stringWhat the discount applies to: "all" is every ticket type; an add-on is discounted only when named here. Refund protection (a pass_through add-on) cannot be named: a code never reduces it.
unlocksarray of stringHidden types and add-ons it makes visible and holdable.
max_usesinteger | nullOrders that may use it in all, or null.
max_quantity_per_orderinteger | nullUnits discounted in one order, or null for all of them. A bundle is one unit. Left out when a code is made: 1 for a single-use code, no limit otherwise. Changing max_uses moves a limit that was the default to the new de…
starts_atstring (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
ends_atstring (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
partnerstringAn id starting with ptr_.
activeboolean
metadataobjectYour own key-value pairs (up to 50; keys up to 40 characters, values up to 500). We store and return them and never act on them.

* required

JSON
{
  "event": "evt_yrd2027",
  "code": "CABANA",
  "unlocks": [
    "tt_cabana"
  ]
}

Answers 201. The code.

Fields (Code)

FieldTypeDescription
object *"code"
id *stringAn id starting with code_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
code *stringA promo or access code as typed; case does not matter.
description *string | null
discount *Discount | nullWhat it takes off, or null for an access code that only unlocks.
applies_to *"all" | array of stringWhat the discount applies to: "all" is every ticket type; an add-on is discounted only when named here. Refund protection (a pass_through add-on) cannot be named: a code never reduces it.
unlocks *array of stringHidden types and add-ons it makes visible and holdable.
max_uses *integer | nullOrders that may use it in all, or null.
max_quantity_per_order *integer | nullUnits discounted in one order, or null for all of them. A bundle is one unit. Left out when a code is made: 1 for a single-use code, no limit otherwise. Changing max_uses moves a limit that was the default to the new de…
starts_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
ends_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
partner *string | nullThe partner or influencer it belongs to.
active *boolean
metadata *MetadataYour own key-value pairs (up to 50; keys up to 40 characters, values up to 500). We store and return them and never act on them.
uses *integerOrders made with it (its holds consumed). Comps credited to it are counted in reports, never here.
reserved *integerUses held by open holds right now: counted against max_uses until the hold expires, is released or becomes an order.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
updated_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Errors of its own. currency_mismatch, code_already_exists, invalid_state_transition. The errors every operation can answer are on the errors page.

List and search codes, the code text in the body (never in a URL)#

POST /v1/codes/search

Operation id searchCodes. MCP tool search_codes. SDK tickets.codes.search.

The same list and filters as GET /v1/codes, with code (the text to find, in any letter case) in the body so it never goes in a URL, where our logs and browser history would keep it. The text of a code is null for a read key or a viewer.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has read (owner, admin, staff, viewer).

Request body

FieldTypeDescription
limitintegerHow many to return, 1 to 100 (default 20).
starting_afterstringAn id from the page before: the page after it.
ending_beforestringAn id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other filter or sort (page…
eventstringAn id starting with evt_.
partnerstringAn id starting with ptr_.
active"true" | "false"
codestring
origin"explicit" | "batch"explicit: codes made one at a time. batch: codes made by a code batch. Goes with event and no other filter.
JSON
{
  "event": "evt_yrd2027",
  "code": "VISITDETROIT"
}

Answers 200. A page of codes: the same filters and answer as GET /v1/codes. Use this to find a code by its text. The text of a code is null for a read key or a viewer.

Fields

FieldTypeDescription
object *"list"
data *array of CodeAsReadThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *"/v1/codes/search"The path this list came from (/v1/codes/search).

* required

Retrieve a code#

GET /v1/codes/{id}

Operation id getCode. MCP tool get_code. SDK tickets.codes.retrieve.

One code with its use count. The text of the code is null for a read key or a viewer.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has read (owner, admin, staff, viewer).

ParameterInTypeDescription
id *pathstringAn id starting with code_.

Answers 200. The code. Its text is null for a read key or a viewer.

Fields (CodeAsRead)

FieldTypeDescription
object *"code"
id *stringAn id starting with code_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
code *string | nullThe text of the code. Null for a read key or a viewer: a code is a thing to spend, so reading one needs the right to change the catalog.
description *string | null
discount *Discount | nullWhat it takes off, or null for an access code that only unlocks.
applies_to *"all" | array of stringWhat the discount applies to: "all" is every ticket type; an add-on is discounted only when named here. Refund protection (a pass_through add-on) cannot be named: a code never reduces it.
unlocks *array of stringHidden types and add-ons it makes visible and holdable.
max_uses *integer | nullOrders that may use it in all, or null.
max_quantity_per_order *integer | nullUnits discounted in one order, or null for all of them. A bundle is one unit. Left out when a code is made: 1 for a single-use code, no limit otherwise. Changing max_uses moves a limit that was the default to the new de…
starts_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
ends_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
partner *string | nullThe partner or influencer it belongs to.
active *boolean
metadata *MetadataYour own key-value pairs (up to 50; keys up to 40 characters, values up to 500). We store and return them and never act on them.
uses *integerOrders made with it (its holds consumed). Comps credited to it are counted in reports, never here.
reserved *integerUses held by open holds right now: counted against max_uses until the hold expires, is released or becomes an order.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
updated_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Change a code (not its text)#

PATCH /v1/codes/{id}

Operation id updateCode. MCP tool update_code. SDK tickets.codes.update.

Changes a code's discount, what it applies to, limits, dates, partner or whether it is active. The text of a code never changes: make a new one.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has catalog.write (owner, admin, staff).

ParameterInTypeDescription
id *pathstringAn id starting with code_.

Request body (UpdateCodeInput)

FieldTypeDescription
descriptionstring | null
discountDiscount | null
applies_to"all" | array of stringWhat the discount applies to: "all" is every ticket type; an add-on is discounted only when named here. Refund protection (a pass_through add-on) cannot be named: a code never reduces it.
unlocksarray of stringHidden types and add-ons it makes visible and holdable.
max_usesinteger | nullNever below the uses so far plus those open holds reserve (limit_below_committed); applied to its use pool in the same write.
max_quantity_per_orderinteger | nullUnits discounted in one order, or null for all of them. A bundle is one unit. Left out when a code is made: 1 for a single-use code, no limit otherwise. Changing max_uses moves a limit that was the default to the new de…
starts_atstring | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
ends_atstring | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
partnerstring | nullAn id starting with ptr_.
activeboolean
metadataobjectYour own key-value pairs (up to 50; keys up to 40 characters, values up to 500). We store and return them and never act on them.
JSON
{
  "active": false
}

Answers 200. Updated.

Fields (Code)

FieldTypeDescription
object *"code"
id *stringAn id starting with code_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
code *stringA promo or access code as typed; case does not matter.
description *string | null
discount *Discount | nullWhat it takes off, or null for an access code that only unlocks.
applies_to *"all" | array of stringWhat the discount applies to: "all" is every ticket type; an add-on is discounted only when named here. Refund protection (a pass_through add-on) cannot be named: a code never reduces it.
unlocks *array of stringHidden types and add-ons it makes visible and holdable.
max_uses *integer | nullOrders that may use it in all, or null.
max_quantity_per_order *integer | nullUnits discounted in one order, or null for all of them. A bundle is one unit. Left out when a code is made: 1 for a single-use code, no limit otherwise. Changing max_uses moves a limit that was the default to the new de…
starts_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
ends_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
partner *string | nullThe partner or influencer it belongs to.
active *boolean
metadata *MetadataYour own key-value pairs (up to 50; keys up to 40 characters, values up to 500). We store and return them and never act on them.
uses *integerOrders made with it (its holds consumed). Comps credited to it are counted in reports, never here.
reserved *integerUses held by open holds right now: counted against max_uses until the hold expires, is released or becomes an order.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
updated_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Errors of its own. currency_mismatch, limit_below_committed, invalid_state_transition. The errors every operation can answer are on the errors page.