get
https://api.swoogo.com/api/v1/discounts
Retrieves all discount codes for a specific event. Discount codes can be percentage-based, absolute (fixed amount), or specific (custom fees per line item). Requires the event_id query parameter. Use expand to include alternates, autopopulate field mappings, registrantCount, or reservedCount.
Available Fields
These are the standard fields returned for each discount code:
| Name | Type | Description |
|---|---|---|
id |
integer | The ID of the discount code. |
parent_id |
integer (nullable) | ID of the primary discount code when this row is an alternate; null for primary codes. |
event_id |
integer | The ID of the event to which this discount is associated. |
code |
string | The unique code for the discount. |
type |
string | The type of discount: percentage, absolute, or specific. |
percentage_discount |
number | The percentage value of the discount (when type is percentage). |
absolute_discount |
number | The absolute monetary value of the discount (when type is absolute). |
applicable_line_items |
array of strings (nullable) | Line items the discount applies to when apply_to_all is 0. Standard values: reg_type, package, session, plus c_<questionId> for custom questions. |
apply_to_all |
integer (0 or 1) | Returned as 0 or 1 (not a JSON boolean). 1 means the discount applies to every line item. |
capacity |
integer | The maximum number of times this discount can be used. 0 means unlimited. |
min_group_size |
integer | The minimum group size required to use this discount. |
registrants_per_use |
integer | Maximum number of times the code can be used per group of N registrants. |
custom_fees |
object (nullable) | Merged set of line-item-specific fees for specific discounts. Outer key is line-item type, inner key is line-item ID, value is the fee as a string. |
sold_out_message |
string (nullable) | Custom message shown when the discount is sold out. |
notes |
string (nullable) | Additional notes or comments about the discount. |
created_at |
string (date-time) | Timestamp when the discount was created. |
updated_at |
string (date-time) | Timestamp when the discount was last updated. |
Extra Fields
Additional fields available via the expand query parameter:
| Name | Type | Description |
|---|---|---|
alternates |
array of objects | Alternate code list, which inherits the settings of the main code. |
autopopulate |
array of objects | Registrant fields automatically populated when this discount is applied. |
registrantCount |
integer | Number of registrants that used this discount code. |
reservedCount |
integer | Number of reserved discount codes (in-progress registrations). |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
