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.
Authorizations
OAuth 2.0 bearer token obtained from POST /oauth2/token. Tokens expire after 30 minutes. Include in the Authorization header as Bearer {access_token}.
Body
ID of the event to which this discount is associated.
12345
Unique code for the discount within the event. May not contain <, >, \, or ".
255"SPRINGSALE2024"
The type of discount being applied.
percentage—percentage_discountis required.absolute—absolute_discountis required.specific— line-item-specific fees are supplied viacustom_fees_update.
percentage, absolute, specific "percentage"
Percentage value of the discount. Required when type is percentage.
0 <= x <= 10015
Absolute monetary value of the discount. Required when type is absolute.
25.5
If true, the discount applies to every line item; if false, only to those listed in applicable_line_items.
true
Maximum number of times this discount can be used. Omit (or 0) for unlimited.
10
Minimum group size required to use this discount.
x >= 25
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.
x >= 22
Whether all registrants in a group must use the same discount.
true
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).
["session", "package"]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.
{
"session": { "4147126": "315", "4147127": "337.5" }
}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.
Free-form notes or comments about the discount.
"Discount for early bird registrants."
Custom message shown when the discount is sold out. Defaults to a generic message when not set.
255"SPRINGSALE2024 has been used too many times."
Response
Created
The discount payload returned by every read endpoint. Reflects Discount::fields() exactly —
every property is always present in the response (values may be null).
6095869
ID of the primary discount when this row is an alternate code; null (or 0) for primary codes.
null
261977
"SPRINGSALE2024"
percentage, absolute, specific "percentage"
Maximum number of times this discount can be used. 0 means unlimited.
10
0
0
null
15
0
["session", "package"]Returned as 0 or 1 (not a JSON boolean), even though the request accepts a boolean.
0, 1 1
Merged set of line-item-specific fees for specific discounts. Outer key is the line-item
type (reg_type, package, session), inner key is the line-item ID (numeric string), value
is the fee as a string. Populated by custom_fees_update on write.
{
"session": { "4147126": "315", "4147127": "337.5" }
}"Discount for early bird registrants."
Timestamp when the discount was created. Formatted as YYYY-MM-DD HH:MM:SS.
"2026-04-28 21:00:15"
Timestamp when the discount was last updated. Formatted as YYYY-MM-DD HH:MM:SS.
"2026-04-28 21:00:15"