Skip to main content
PATCH
Update a discount code
This endpoint is restricted and not generally available: organizations that have not been enabled receive a 403. Contact your Let’s Do This representative if you’d like access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the resource to query by

Body

application/json

The fields to update on a discount code. Only the internal code name can be updated; every other field on the code is left as it is.

group
string
required

The new internal code name, a free-form grouping label shown in the organizer dashboard. Send an empty string to clear it.

Maximum string length: 256

Response

Default Response

A discount code belonging to your organizer.

id
string
required

The unique ID of the discount code.

code
string
required

The code participants enter at checkout, uppercased.

eventIds
string[]
required

The events the code is restricted to. Empty when it allows all of them.

eventOccurrenceIds
string[]
required

The event occurrences the code is restricted to. Empty when it allows all of them.

appliesPer
enum<string>
required

How often a discount code comes off a basket. These are the same two options the organizer dashboard offers as its discount type.

TRANSACTION discounts the basket once, however many entries it holds. ENTRY discounts each participant's entry separately, so a basket of three entries is discounted three times.

Available options:
TRANSACTION,
ENTRY
group
string

The internal code name: a free-form grouping label shown in the organizer dashboard and never seen by participants. Omitted when the code has none.

description
string

An internal description of the code, shown in the organizer dashboard.

percentage
integer

The percentage discount the code applies. Omitted for flat-rate codes.

flatRate
integer

The fixed discount the code applies, in the minor unit of the event's currency (e.g. pence, cents).

maxValue
integer

The maximum total value the code can discount, in the minor unit of the event's currency.

startDate
string

Represents a date and time in ISO 8601 format as a string.

The string should follow the format YYYY-MM-DDTHH:mm:ss.sssZ, where:

  • YYYY: Four-digit year
  • MM: Two-digit month (01-12)
  • DD: Two-digit day of the month (01-31)
  • T: Delimiter indicating the start of the time component
  • HH: Two-digit hour in 24-hour format (00-23)
  • mm: Two-digit minutes (00-59)
  • ss.sss: Seconds with milliseconds (00.000-59.999)
  • Z: UTC timezone designator

Example: To represent 11:30 AM on May 8th, 2026, the value would be: "2026-05-08T11:30:00.000Z".

Example:

"2026-05-08T11:30:00.000Z"

expiresAt
string

Represents a date and time in ISO 8601 format as a string.

The string should follow the format YYYY-MM-DDTHH:mm:ss.sssZ, where:

  • YYYY: Four-digit year
  • MM: Two-digit month (01-12)
  • DD: Two-digit day of the month (01-31)
  • T: Delimiter indicating the start of the time component
  • HH: Two-digit hour in 24-hour format (00-23)
  • mm: Two-digit minutes (00-59)
  • ss.sss: Seconds with milliseconds (00.000-59.999)
  • Z: UTC timezone designator

Example: To represent 11:30 AM on May 8th, 2026, the value would be: "2026-05-08T11:30:00.000Z".

Example:

"2026-05-08T11:30:00.000Z"

firstBookingOnly
boolean

Whether the code only applies to a booker's first booking.

limitUsage
integer

How many times the code can be used in total.

limitUsagePerUser
integer

How many times a single user can use the code.

limitUsagePerTransaction
integer

How many entries a single transaction can apply the code to.

appliesTo
enum<string>[]

Which parts of the basket the code discounts. Omitted when the code is restricted to none of the categories this API names — an unrestricted code comes off the whole basket.

The part of the basket a discount code applies to. These are the same categories the organizer dashboard offers, so a code created through the API and one created in the dashboard describe themselves the same way.

MERCH_AND_ADDONS covers every merchandise and add-on category; FORM_ITEMS covers the remaining booking form items.

Available options:
TICKETS,
BOOKING_FEE,
MERCH_AND_ADDONS,
FORM_ITEMS,
MEMBERSHIPS
createdAt
string

Represents a date and time in ISO 8601 format as a string.

The string should follow the format YYYY-MM-DDTHH:mm:ss.sssZ, where:

  • YYYY: Four-digit year
  • MM: Two-digit month (01-12)
  • DD: Two-digit day of the month (01-31)
  • T: Delimiter indicating the start of the time component
  • HH: Two-digit hour in 24-hour format (00-23)
  • mm: Two-digit minutes (00-59)
  • ss.sss: Seconds with milliseconds (00.000-59.999)
  • Z: UTC timezone designator

Example: To represent 11:30 AM on May 8th, 2026, the value would be: "2026-05-08T11:30:00.000Z".

Example:

"2026-05-08T11:30:00.000Z"