Create Discount Code

Creates a new discount code for an event. Requires event_id, code, and type (percentage, absolute, or specific). Set capacity to limit total usage, apply_to_all to apply across every line item, or list specific items in applicable_line_items for targeted discounts. For specific-type discounts, supply line-item-specific fees via custom_fees_update. Group constraints can be configured via min_group_size, registrants_per_use, and all_registrants_in_group.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
required

ID of the event to which this discount is associated.

string
required
length ≤ 255

Unique code for the discount within the event. May not contain <, >, \, or ".

string
enum
required

The type of discount being applied.

  • percentagepercentage_discount is required.
  • absoluteabsolute_discount is required.
  • specific — line-item-specific fees are supplied via custom_fees_update.
Allowed:
float
0 to 100

Percentage value of the discount. Required when type is percentage.

float

Absolute monetary value of the discount. Required when type is absolute.

boolean

If true, the discount applies to every line item; if false, only to those listed in applicable_line_items.

integer

Maximum number of times this discount can be used. Omit (or 0) for unlimited.

integer
≥ 2

Minimum group size required to use this discount.

integer
≥ 2

Maximum number of times the code can be used per group of N registrants. e.g. set to 2 to allow 1 use in a group of 2, 2 uses in a group of 4, etc.

boolean

Whether all registrants in a group must use the same discount.

applicable_line_items
array of strings

Line items the discount applies to when apply_to_all is false. Standard values are
reg_type, package, and session. Custom-question line items use the form c_<questionId>
(e.g. c_438).

applicable_line_items
custom_fees_update
object

For specific discounts: maps each line-item type to a map of line-item IDs and the
replacement fee (as a string). On save, these entries are merged into the persisted
custom_fees object. Returned only via the custom_fees field on read responses.

autopopulate_attributes
array of objects

Registrant fields to be automatically populated when this discount is applied. Each entry
has an attribute (registrant attribute name or c_<questionId> for custom questions)
and a value.

autopopulate_attributes
string

Free-form notes or comments about the discount.

string
length ≤ 255

Custom message shown when the discount is sold out. Defaults to a generic message when not set.

Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
Credentials
Bearer
access_token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json