Creates a new tier with levels within a program.
key and at least one level. Each level has its own key and a rank that sets its position in the hierarchy (higher rank = higher tier). Both the tier key and level key are immutable after creation. Keys must be lowercase alphanumeric with underscores, starting with a letter.
lifecycle object controls how the tier behaves over time. Omit it to create a rules-only tier where changes are driven entirely by SET_TIER rule actions or direct API calls.
When present, lifecycle has four parts:
retention controls whether the tier is re-evaluated on a periodic schedule (PERIOD_BASED) or expires after a duration of inactivity (ACTIVITY_REFRESH). With ACTIVITY_REFRESH, each event processed for the participant resets the timer.qualification_period sets the evaluation cycle for PERIOD_BASED retention: CALENDAR_YEAR (Jan 1 to Dec 31), FIXED_YEAR (custom start date via start_month and start_day), or NONE.downgrade_policy determines what happens when qualification lapses. DROP_TO_QUALIFYING re-evaluates and drops to the highest level the participant still qualifies for. DROP_ONE drops exactly one rank. HOLD keeps the current level indefinitely. Set grace_days to defer downgrades and min_level to establish a floor.counters controls whether qualifying counters reset to zero (NONE) or carry over the excess above the current level’s threshold (EXCESS) at period end. The qualifying array lists which counter keys are subject to rollover.qualification criteria for counter-based auto-advancement. After rules fire for an event, Scrip evaluates each level’s thresholds and upgrades the participant to the highest level they qualify for.
Set mode to ALL (every criterion must pass) or ANY (at least one). Each criterion checks a counter key against a threshold using an operator: >=, >, ==, <=, or <.
Auto-qualification only upgrades. Downgrades happen through the lifecycle system at period end or timer expiration.
benefits is a freeform JSON object on each level. Scrip stores it and returns it with the participant’s tier state. Use it to drive behavior in your application, like a points_multiplier, free_shipping flag, or discount_percent. Scrip does not interpret the benefits payload. It is a data contract between your tier configuration and your application.
API key passed in the X-API-Key header.
Program ID
Tier definition with at least one level
Unique identifier for this tier within the program (immutable after creation, lowercase alphanumeric + underscores)
1 - 100^[a-z][a-z0-9_]*$"status"
Ordered set of levels within this tier (at least one required)
1Human-readable name shown in dashboards and reports
255"Loyalty Status"
Controls how tiers behave over time: retention mode, qualification period, downgrade policy, and counter rollover. Omit for rules-only mode.
Tier created
A tier definition with its levels, lifecycle configuration, and metadata
When this tier was created (RFC 3339)
"2024-01-15T10:30:00Z"
Human-readable name
"Loyalty Status"
Unique identifier for this tier
"550e8400-e29b-41d4-a716-446655440000"
Tier key used in API calls and rule actions
"status"
Ordered list of levels within this tier
Lifecycle configuration (retention mode, qualification period, downgrade policy, counter rollover)
Program this tier belongs to
"550e8400-e29b-41d4-a716-446655440001"
When this tier was last modified (RFC 3339)
"2024-01-15T10:30:00Z"