Coupon
Inferred TypeScript type from the coupon schema
Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | |
created | string | ✓ | |
changed | string | ✓ | |
version | string | ✓ | |
companyId | string | ✓ | ID of the company that issued this coupon. |
description | string | ✓ | Internal description for the coupon. This is not necessarily visible to users. |
code | string | ✓ | 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. |
amountOff | number | ✓ | 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. |
percentOff | number | ✓ | Percentage to deduct from the item or order total. Range is 0–100. Use 0 for no percentage-based discount. |
limit | number | ✓ | Total number of times this coupon can be used. A value of 0 means unlimited usage. |
quantitySold | number | ✓ | Number of times this coupon has been redeemed. Read-only field. |
offeringIds | string[] | ✓ | List of offering IDs (e.g., ticket classes) this coupon applies to. If empty, the coupon applies to all eligible offerings in its context. |
contextIds | string[] | ✓ | List of context IDs (e.g., event, venue, or organizer) this coupon is valid for. Follows the format: “evt_xxx”, “org_xxx”, etc. |
constraints | object | Time-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. |
Field Examples
Section titled “Field Examples”companyId:
"company_123abc"description:
"Early bird discount for spring events"code:
"SPRING2025"type:
"coded"amountOff:
10.0percentOff:
20.0limit:
100quantitySold:
42offeringIds:
["off_123abc", "off_456def"]contextIds:
["evt_abc123", "org_def456"]constraints:
\{start: \{ date: "2025-04-01T00:00:00" \},end: \{ secondsBefore: 3600 \}\}status:
"active"