A code a customer types at checkout to lower the price of a product or activity registration. Codes are scoped to one business. Applies either a fixed-cents discount (type: fixedAmount, fixedAmountCents set), a percentage discount (type: percentage, percentOff set), or makes the line zero (type: free). Optional date window, usage caps, eligibility conditions, and item restrictions limit when and where the code applies.
Fields
idID!businessBusiness!urlResourceUrl!Canonical staff-admin page for this discount. Consume instead of building paths from the id.
codeString!nameStringOptional admin-facing label (e.g. "Spring 2026 promo"). Not shown to customers.
typeDiscountCodeType!fixedAmountCentsIntCents to subtract from the line. Non-null when type is fixedAmount, null when type is percentage or free.
percentOffIntPercent to subtract from the line, from 1 to 100. Non-null when type is percentage, null when type is fixedAmount or free.
statusDiscountCodeStatus!Lifecycle state of the code:
active— eligible for redemption (subject to validity window and limits)inactive— paused; never redeems but can be re-activated laterarchived— soft-deleted; never redeems and not surfaced in default lists
archivedAtDateTimeWhen the code was last archived. Set whenever status transitions to archived; preserved as an audit trail even if the code is later re-activated.
startsAtDateTimeendsAtDateTimemaxUsesIntTotal redemptions allowed across all customers. Null = unlimited.
maxUsesPerUserIntRedemptions allowed per customer. Null = unlimited.
conditions[DiscountCodeCondition!]!itemRestrictions[DiscountCodeItemRestriction!]!Items the code applies to. Empty list means it applies to every product and activity in the business.
redemptions[DiscountCodeRedemption!]!redemptionCountInt!Number of redemptions counted against maxUses. Excludes redemptions cancelled when the parent purchase or registration was cancelled.
totalDiscountedCentsInt!Sum of amountAppliedCents across all non-cancelled redemptions. Useful for showing the total dollar value a code has discounted to date.
createdAtDateTime!