Skip to content

Coupon

Inferred TypeScript type from the coupon schema

FieldTypeRequiredDescription
idstring✓
createdstring✓
changedstring✓
versionstring✓
companyIdstring✓ID of the company that issued this coupon.
descriptionstring✓Internal description for the coupon. This is not necessarily visible to users.
codestring✓The code used to redeem this coupon during checkout. For public or coded discounts.
type"access" | "coded" | "public" | "hold"✓Type of coupon — determines how it’s distributed or applied.
amountOffnumber✓Fixed amount to deduct from the order total. This is a currency-less value that matches the event or order currency. Example: 10.00 = $10.00 off.
percentOffnumber✓Percentage to deduct from the item or order total. Range is 0–100. Use 0 for no percentage-based discount.
limitnumber✓Total number of times this coupon can be used. A value of 0 means unlimited usage.
quantitySoldnumber✓Number of times this coupon has been redeemed. Read-only field.
offeringIdsstring[]✓List of offering IDs (e.g., ticket classes) this coupon applies to. If empty, the coupon applies to all eligible offerings in its context.
contextIdsstring[]✓List of context IDs (e.g., event, venue, or organizer) this coupon is valid for. Follows the format: “evt_xxx”, “org_xxx”, etc.
constraintsobjectTime-based constraints that control when the coupon is active and when it expires. Supports absolute dates or relative time offsets (in seconds) from event start. - If start is omitted, the coupon is valid immediately. - If end is omitted, the coupon remains valid until the event ends.
status"active" | "expired" | "disabled" | "sold_out"✓Current status of the coupon for administrative purposes. Determines whether it can be redeemed at checkout.

companyId:

"company_123abc"

description:

"Early bird discount for spring events"

code:

"SPRING2025"

type:

"coded"

amountOff:

10.0

percentOff:

20.0

limit:

100

quantitySold:

42

offeringIds:

["off_123abc", "off_456def"]

contextIds:

["evt_abc123", "org_def456"]

constraints:

\{
start: \{ date: "2025-04-01T00:00:00" \},
end: \{ secondsBefore: 3600 \}
\}

status:

"active"