> ## Documentation Index
> Fetch the complete documentation index at: https://developers.loyaltylion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Configuration

Use this endpoint to retrieve the full configuration for a site, based on the requested
sales channel.

This configuration includes tier details, rules, rewards and various other settings that
can be used to construct a custom shopper-facing frontend.

<Note>
  This endpoint has a rate limit of 100 requests per second

  If you anticipate making a high volume of calls to this endpoint, e.g. if you
  are calling it on each page render, consider caching the returned configuration
  for a short period (max 30 seconds) and reusing it
</Note>


## OpenAPI

````yaml headless-api/2025-06/openapi.json GET /headless/2025-06/{site_id}/configuration
openapi: 3.1.1
info:
  title: LoyaltyLion Headless API
  version: 2025-06
servers:
  - url: https://api.loyaltylion.com
security: []
tags:
  - name: configuration
  - name: customers
  - name: rewards
  - name: rules
paths:
  /headless/2025-06/{site_id}/configuration:
    get:
      tags:
        - configuration
      operationId: configuration.getConfiguration
      parameters:
        - name: site_id
          in: path
          required: true
          schema:
            type: number
          description: Your LoyaltyLion Site ID
        - name: channel
          in: query
          description: >-
            The sales channel from which this request is made. Must be provided
            as this query parameter, or the `X-LoyaltyLion-Channel` header
          schema:
            $ref: '#/components/schemas/SupportedChannel'
        - name: language
          in: query
          description: >-
            The language to use for the request. If not provided, the site's
            default language will be used
          schema:
            type: string
            pattern: ^[a-z]{2,3}$|^[a-z]{2,3}-[a-z0-9]{2,4}$
        - name: country
          in: query
          description: >-
            ISO 3166-1 alpha-2 country code for the customer. Used to filter
            rewards by country availability. If not provided, the site default
            is used
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteConfiguration'
                example:
                  channel: web
                  currency: usd
                  language: en
                  program:
                    name: Lion Rewards
                  tier_configuration:
                    boundary_mode: spend
                    tiers:
                      - id: 1
                        name: Silver
                        benefit_ids:
                          - 1
                        hidden: false
                        kind: spend
                        position: 1
                        lower_bound:
                          amount: 0
                          formatted: $0
                        upper_bound:
                          amount: 99.99
                          formatted: $99.99
                      - id: 2
                        name: Gold
                        benefit_ids:
                          - 1
                          - 2
                        hidden: false
                        kind: spend
                        position: 2
                        lower_bound:
                          amount: 100
                          formatted: $100
                        upper_bound: null
                    tier_benefits:
                      - id: 1
                        label: Early access to new products
                        secret: false
                        details: null
                      - id: 2
                        label: Free makeup classes
                        secret: false
                        details:
                          plaintext: |
                            Email classes@example.com to sign up to a class
                          html: >-
                            <p>Email classes@example.com to sign up to a
                            class</p>
                    membership:
                      mode: rolling
                      duration_months: 12
                  referee_incentive:
                    minimum_spend:
                      amount: 100
                      formatted: $100
                    incentive_text: >-
                      Get a 10% discount on your order with this code when you
                      spend over $100
                    kind: cart_discount_voucher
                    discount_kind: percentage
                    discount:
                      percentage: 10
                      formatted: 10%
                  rules:
                    - id: 1
                      kind: purchase
                      variants:
                        - tier_id: 1
                          enabled: true
                          title: Make a purchase
                          result:
                            kind: points
                            per_currency_unit: 1
                            points: 5
                          result_short_text: 5 points per $1
                        - tier_id: 2
                          enabled: true
                          title: Make a purchase
                          result:
                            kind: points
                            per_currency_unit: 1
                            points: 10
                          result_short_text: 10 points per $1
                      limit: null
                    - id: 2
                      kind: pageview
                      variants:
                        - tier_id: 1
                          enabled: true
                          title: Visit our online store
                          result:
                            kind: points
                            per_currency_unit: null
                            points: 100
                          result_short_text: 100 points
                        - tier_id: 2
                          enabled: true
                          title: Visit our online store
                          result:
                            kind: points
                            per_currency_unit: null
                            points: 200
                          result_short_text: 200 points
                      limit:
                        count: 1
                        interval: week
                  rewards:
                    - id: 1
                      kind: cart_discount_voucher
                      properties:
                        discount_type: fixed
                        discount:
                          amount: 5
                          formatted: $5
                        applies_to_order_type: one_time
                        recurring_cycle_limit: 1
                        supports_active_subscriptions: false
                        minimum_spend:
                          amount: 10
                          formatted: $10
                      variants:
                        - tier_id: 1
                          enabled: true
                          title: $5 discount
                          cost:
                            kind: fixed
                            points: 500
                          cost_text: 500 points
                        - tier_id: 2
                          enabled: true
                          title: $5 discount
                          cost:
                            kind: fixed
                            points: 400
                          cost_text: 400 points
                      limit: null
                    - id: 2
                      kind: cart_variable_discount_voucher
                      properties:
                        minimum_discount:
                          amount: 1
                          formatted: $1
                        maximum_discount:
                          amount: 100
                          formatted: $100
                        applies_to_order_type: all
                        minimum_spend_before_discount: null
                        minimum_spend_after_discount: null
                      variants:
                        - tier_id: 1
                          enabled: false
                          title: Redeem points at checkout
                          cost:
                            kind: variable
                            unit: discount_amount
                            points_per_unit: 100
                          cost_text: 100 points per $1
                        - tier_id: 2
                          enabled: true
                          title: Redeem points at checkout
                          cost:
                            kind: variable
                            unit: discount_amount
                            points_per_unit: 100
                          cost_text: 100 points per $1
                      limit: null
        '400':
          $ref: '#/components/responses/ClientErrorBadRequest'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '422':
          description: '422'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: '429'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - ProgramApiKey:
            - read_customers
components:
  schemas:
    SupportedChannel:
      type: string
      enum:
        - web
        - pos
        - mobile
      description: The sales channel from which this request is made
    SiteConfiguration:
      type: object
      properties:
        channel:
          $ref: '#/components/schemas/SupportedChannel'
          description: The sales channel for which this response was generated
        currency:
          type: string
          description: >-
            `ISO 4217` code indicating the currency for any financial values in
            this response
          example: usd
        language:
          type: string
          pattern: ^[a-z]{2,3}$|^[a-z]{2,3}-[a-z0-9]{2,4}$
          description: >-
            `ISO 639-1` code indicating the language used for any text in this
            response
        program:
          type: object
          properties:
            name:
              type: string
              description: The name of the program
              example: Lion Rewards
          required:
            - name
          additionalProperties: false
        tier_configuration:
          anyOf:
            - type: object
              properties:
                boundary_mode:
                  type: string
                  enum:
                    - points
                    - spend
                tiers:
                  type: array
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/PointsTier'
                      - $ref: '#/components/schemas/SpendTier'
                      - $ref: '#/components/schemas/ConditionalTier'
                    type: object
                    discriminator:
                      propertyName: kind
                      mapping:
                        points:
                          $ref: '#/components/schemas/PointsTier'
                        spend:
                          $ref: '#/components/schemas/SpendTier'
                        conditional:
                          $ref: '#/components/schemas/ConditionalTier'
                tier_benefits:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      label:
                        type: string
                        description: A short label explaining what this tier benefit is
                        example: Early access to new collections
                      secret:
                        type: boolean
                        description: >-
                          Indicates if this is a 'secret' tier benefit. Such
                          benefits should only be shown if the current customer
                          is already in the associated tier
                        example: false
                      details:
                        anyOf:
                          - type: object
                            properties:
                              plaintext:
                                type: string
                                description: >-
                                  More information about this benefit as basic
                                  plaintext string with line breaks
                                example: >
                                  Please email us (store@example.com) to receive
                                  this benefit
                              html:
                                type: string
                                description: >-
                                  More information about this benefit. This can
                                  include simple HTML tags such as formatting,
                                  lists, and links
                                example: >-
                                  <p>Please <a
                                  href='mailto:store@example.com'>email us</a>
                                  to receive this benefit</p>
                            required:
                              - plaintext
                              - html
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          More details about this tier benefit as HTML and
                          plaintext strings. Will be `null` if there are no
                          additional details for this benefit
                    required:
                      - id
                      - label
                      - secret
                      - details
                    additionalProperties: false
                membership:
                  oneOf:
                    - $ref: '#/components/schemas/TierMembershipRolling'
                    - $ref: '#/components/schemas/TierMembershipCalendar'
                    - $ref: '#/components/schemas/TierMembershipLifetime'
                    - $ref: '#/components/schemas/TierMembershipEnrollmentAnniversary'
                  description: >-
                    Tier membership mode. Will be one of `rolling` (memberships
                    expire after a duration) , `lifetime` (memberships don't
                    expire), `calendar` (memberships expire according to a fixed
                    calendar schedule), or `enrollment_anniversary` (memberships
                    expire according to the customer's enrollment anniversary)
                  type: object
                  discriminator:
                    propertyName: mode
                    mapping:
                      rolling:
                        $ref: '#/components/schemas/TierMembershipRolling'
                      calendar:
                        $ref: '#/components/schemas/TierMembershipCalendar'
                      lifetime:
                        $ref: '#/components/schemas/TierMembershipLifetime'
                      enrollment_anniversary:
                        $ref: >-
                          #/components/schemas/TierMembershipEnrollmentAnniversary
              required:
                - boundary_mode
                - tiers
                - tier_benefits
                - membership
              additionalProperties: false
            - type: 'null'
          description: >-
            The tier configuration for the program, or `null` if tiers are not
            enabled
          example:
            boundary_mode: spend
            tiers:
              - id: 1
                name: Silver
                benefit_ids:
                  - 1
                hidden: false
                kind: spend
                position: 1
                lower_bound:
                  amount: 0
                  formatted: $0
                upper_bound:
                  amount: 99.99
                  formatted: $99.99
              - id: 2
                name: Gold
                benefit_ids:
                  - 1
                  - 2
                hidden: false
                kind: spend
                position: 2
                lower_bound:
                  amount: 100
                  formatted: $100
                upper_bound: null
            tier_benefits:
              - id: 1
                label: Early access to new products
                secret: false
                details: null
              - id: 2
                label: Free makeup classes
                secret: false
                details:
                  plaintext: |
                    Email classes@example.com to sign up to a class
                  html: <p>Email classes@example.com to sign up to a class</p>
            membership:
              mode: rolling
              duration_months: 12
        referee_incentive:
          description: >-
            The referee incentive for the program, included only if one is
            enabled. This is a description of the incentive and does not include
            an actual voucher code, which is available through the referee
            incentive endpoint instead
          oneOf:
            - $ref: '#/components/schemas/RefereeIncentiveCartDiscount'
              title: Cart Discount Voucher
            - $ref: '#/components/schemas/RefereeIncentiveFreeShipping'
              title: Free Shipping Voucher
          type: object
        rules:
          description: >-
            Ordered list of rules that belong to this site. Each rule will have 
            one or more variants that indicate its configuration and if it is
            enabled per tier. Rules have a `kind` property, and some kinds of
            rules will have `properties` that are specific to that rule kind
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RuleBirthday'
              - $ref: '#/components/schemas/RuleLoyaltyPassInstall'
              - $ref: '#/components/schemas/RuleCollectionPurchase'
              - $ref: '#/components/schemas/RuleNewsletterSignup'
              - $ref: '#/components/schemas/RulePageview'
              - $ref: '#/components/schemas/RuleProductPurchase'
              - $ref: '#/components/schemas/RulePurchase'
              - $ref: '#/components/schemas/RuleJoinProgram'
              - $ref: '#/components/schemas/RuleReview'
              - $ref: '#/components/schemas/RuleCustom'
              - $ref: '#/components/schemas/RuleFacebookLike'
              - $ref: '#/components/schemas/RuleTwitterFollow'
              - $ref: '#/components/schemas/RuleInstagramFollow'
              - $ref: '#/components/schemas/RuleInstagramMention'
              - $ref: '#/components/schemas/RuleInstagramPostHashtag'
              - $ref: '#/components/schemas/RuleTiktokFollow'
              - $ref: '#/components/schemas/RuleTiktokPostHashtag'
              - $ref: '#/components/schemas/RuleReferral'
              - $ref: '#/components/schemas/RuleClickthrough'
              - $ref: '#/components/schemas/RuleRetailPurchase'
            type: object
            discriminator:
              propertyName: kind
              mapping:
                birthday:
                  $ref: '#/components/schemas/RuleBirthday'
                loyalty_pass_install:
                  $ref: '#/components/schemas/RuleLoyaltyPassInstall'
                collection_purchase:
                  $ref: '#/components/schemas/RuleCollectionPurchase'
                newsletter_signup:
                  $ref: '#/components/schemas/RuleNewsletterSignup'
                pageview:
                  $ref: '#/components/schemas/RulePageview'
                product_purchase:
                  $ref: '#/components/schemas/RuleProductPurchase'
                purchase:
                  $ref: '#/components/schemas/RulePurchase'
                join_program:
                  $ref: '#/components/schemas/RuleJoinProgram'
                review:
                  $ref: '#/components/schemas/RuleReview'
                custom:
                  $ref: '#/components/schemas/RuleCustom'
                facebook_like:
                  $ref: '#/components/schemas/RuleFacebookLike'
                twitter_follow:
                  $ref: '#/components/schemas/RuleTwitterFollow'
                instagram_follow:
                  $ref: '#/components/schemas/RuleInstagramFollow'
                instagram_mention:
                  $ref: '#/components/schemas/RuleInstagramMention'
                instagram_post_hashtag:
                  $ref: '#/components/schemas/RuleInstagramPostHashtag'
                tiktok_follow:
                  $ref: '#/components/schemas/RuleTiktokFollow'
                tiktok_post_hashtag:
                  $ref: '#/components/schemas/RuleTiktokPostHashtag'
                referral:
                  $ref: '#/components/schemas/RuleReferral'
                clickthrough:
                  $ref: '#/components/schemas/RuleClickthrough'
                retail_purchase:
                  $ref: '#/components/schemas/RuleRetailPurchase'
        rewards:
          description: >-
            Ordered list of rewards that belong to this site. Each reward will
            have  one or more variants that indicate its configuration and if it
            is enabled per tier. Rewards have a `kind` property, and some kinds
            of rewards will have `properties` that are specific to that reward
            kind
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RewardGiftCard'
              - $ref: '#/components/schemas/RewardCartDiscountVoucher'
              - $ref: '#/components/schemas/RewardCartVariableDiscountVoucher'
              - $ref: '#/components/schemas/RewardFreeShippingVoucher'
              - $ref: '#/components/schemas/RewardProductDiscountVoucher'
              - $ref: '#/components/schemas/RewardCollectionDiscountVoucher'
              - $ref: '#/components/schemas/RewardProductCart'
              - $ref: '#/components/schemas/RewardActiveSubscriptionDiscountVoucher'
              - $ref: '#/components/schemas/RewardActiveSubscriptionProduct'
              - $ref: '#/components/schemas/RewardCustom'
            type: object
            discriminator:
              propertyName: kind
              mapping:
                gift_card:
                  $ref: '#/components/schemas/RewardGiftCard'
                cart_discount_voucher:
                  $ref: '#/components/schemas/RewardCartDiscountVoucher'
                cart_variable_discount_voucher:
                  $ref: '#/components/schemas/RewardCartVariableDiscountVoucher'
                free_shipping_voucher:
                  $ref: '#/components/schemas/RewardFreeShippingVoucher'
                product_discount_voucher:
                  $ref: '#/components/schemas/RewardProductDiscountVoucher'
                collection_discount_voucher:
                  $ref: '#/components/schemas/RewardCollectionDiscountVoucher'
                product_cart:
                  $ref: '#/components/schemas/RewardProductCart'
                active_subscription_discount_voucher:
                  $ref: '#/components/schemas/RewardActiveSubscriptionDiscountVoucher'
                active_subscription_product:
                  $ref: '#/components/schemas/RewardActiveSubscriptionProduct'
                custom:
                  $ref: '#/components/schemas/RewardCustom'
      required:
        - channel
        - currency
        - language
        - program
        - tier_configuration
        - rules
        - rewards
      additionalProperties: false
    PointsTier:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          description: The name of the tier
          example: Gold
        position:
          type: number
          description: The position of the tier, where `1` is the first and default tier
        hidden:
          type: boolean
          description: >-
            If true, this is a hidden tier and is only shown to shoppers who are
            in it
        benefit_ids:
          description: Ordered list of tier benefit IDs that are associated with this tier
          type: array
          items:
            type: integer
        kind:
          type: string
          const: points
        lower_bound:
          type: integer
          example: 0
          description: The lower bound of the tier in points
        upper_bound:
          example: 99
          description: >-
            The upper bound of the tier in points, or `null` if there is no
            upper bound
          type:
            - integer
            - 'null'
      required:
        - id
        - name
        - position
        - hidden
        - benefit_ids
        - kind
        - lower_bound
        - upper_bound
      additionalProperties: false
      title: Points
    SpendTier:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          description: The name of the tier
          example: Gold
        position:
          type: number
          description: The position of the tier, where `1` is the first and default tier
        hidden:
          type: boolean
          description: >-
            If true, this is a hidden tier and is only shown to shoppers who are
            in it
        benefit_ids:
          description: Ordered list of tier benefit IDs that are associated with this tier
          type: array
          items:
            type: integer
        kind:
          type: string
          const: spend
        lower_bound:
          type: object
          properties:
            amount:
              type: number
            formatted:
              type: string
          required:
            - amount
            - formatted
          additionalProperties: false
          description: >-
            The lower bound of the tier as a currency amount. For example,
            $10.50 would be "10.50", ¥100 would be "100"
        upper_bound:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: 'null'
          description: >-
            The upper bound of the tier as a currency amount, or `null` if there
            is no upper bound. For example, $150.50 USD would be "150.50", ¥500
            would be "500"
      required:
        - id
        - name
        - position
        - hidden
        - benefit_ids
        - kind
        - lower_bound
        - upper_bound
      additionalProperties: false
      title: Spend
    ConditionalTier:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          description: The name of the tier
          example: Gold
        position:
          type: number
          description: The position of the tier, where `1` is the first and default tier
        hidden:
          type: boolean
          description: >-
            If true, this is a hidden tier and is only shown to shoppers who are
            in it
        benefit_ids:
          description: Ordered list of tier benefit IDs that are associated with this tier
          type: array
          items:
            type: integer
        kind:
          type: string
          const: conditional
      required:
        - id
        - name
        - position
        - hidden
        - benefit_ids
        - kind
      additionalProperties: false
      title: Conditional
    TierMembershipRolling:
      type: object
      properties:
        mode:
          type: string
          const: rolling
        duration_months:
          type: number
          example: 12
          description: >-
            The number of months after which a membership in this tier will
            expire
      required:
        - mode
        - duration_months
      additionalProperties: false
      title: Rolling
    TierMembershipCalendar:
      type: object
      properties:
        mode:
          type: string
          const: calendar
        evaluation_period:
          type: object
          properties:
            starts_on:
              type: object
              properties:
                month:
                  type: number
                day:
                  type: number
              required:
                - month
                - day
              additionalProperties: false
              description: The month and day the evaluation period for this tier begins
              example:
                month: 1
                day: 1
            duration:
              type: object
              properties:
                months:
                  type: number
              required:
                - months
              additionalProperties: false
              description: The number of months in the evaluation period
              example:
                months: 12
          required:
            - starts_on
            - duration
          additionalProperties: false
        duration:
          type: object
          properties:
            windows:
              type: number
              description: >-
                The number of evaluation windows the membership lasts for, e.g.
                for a Jan 1 - Dec 31 window, a value of 1 means the membership
                lasts for the rest of the current year and to the end of the
                following year. A value of 0 means the membership only lasts
                until the end of the current year.
              example: 1
          required:
            - windows
          additionalProperties: false
      required:
        - mode
        - evaluation_period
        - duration
      additionalProperties: false
      title: Calendar
    TierMembershipLifetime:
      type: object
      properties:
        mode:
          type: string
          const: lifetime
      required:
        - mode
      additionalProperties: false
      title: Lifetime
    TierMembershipEnrollmentAnniversary:
      type: object
      properties:
        mode:
          type: string
          const: enrollment_anniversary
        duration:
          type: object
          properties:
            windows:
              type: number
              description: >-
                The number of evaluation windows the membership lasts for, e.g.
                for a Jan 1 - Dec 31 window, a value of 1 means the membership
                lasts for the rest of the current year and to the end of the
                following year. A value of 0 means the membership only lasts
                until the end of the current year.
              example: 1
          required:
            - windows
          additionalProperties: false
      required:
        - mode
        - duration
      additionalProperties: false
      title: Enrollment Anniversary
    RefereeIncentiveCartDiscount:
      type: object
      properties:
        minimum_spend:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: 'null'
          description: The minimum spend, if any, for the incentive to apply
          example:
            amount: 50
            formatted: $50
        incentive_text:
          type: string
          description: Short localized text explaining the incentive
          example: >-
            Get a 10% discount on your order with this code when you spend over
            $50
        kind:
          type: string
          const: cart_discount_voucher
        discount_kind:
          type: string
          enum:
            - fixed
            - percentage
          description: The type of discount this voucher will apply to the cart
          example: percentage
        discount:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: object
              properties:
                percentage:
                  type: number
                formatted:
                  type: string
              required:
                - percentage
                - formatted
              additionalProperties: false
          description: >-
            The discount that will apply to the cart. For `fixed` discounts this
            will be the currency amount. For `percentage` discounts, it will be
            a percentage from `1-100`
          example:
            percentage: 10
            formatted: 10%
      required:
        - minimum_spend
        - incentive_text
        - kind
        - discount_kind
        - discount
      additionalProperties: false
    RefereeIncentiveFreeShipping:
      type: object
      properties:
        minimum_spend:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: 'null'
          description: The minimum spend, if any, for the incentive to apply
          example:
            amount: 50
            formatted: $50
        incentive_text:
          type: string
          description: Short localized text explaining the incentive
          example: >-
            Get a 10% discount on your order with this code when you spend over
            $50
        kind:
          type: string
          const: free_shipping_voucher
      required:
        - minimum_spend
        - incentive_text
        - kind
      additionalProperties: false
    RuleBirthday:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: birthday
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Birthday
    RuleLoyaltyPassInstall:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: loyalty_pass_install
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Loyalty pass install
    RuleCollectionPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: collection_purchase
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Collection purchase
    RuleNewsletterSignup:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: newsletter_signup
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Newsletter signup
    RulePageview:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: pageview
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Pageview
    RuleProductPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: product_purchase
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Product purchase
    RulePurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: purchase
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Purchase
    RuleJoinProgram:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: join_program
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Join program
    RuleReview:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: review
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Review
    RuleCustom:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: custom
        properties:
          type: object
          properties:
            name:
              type: string
              description: The name of this custom rule, as set by the merchant
          required:
            - name
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Custom
    RuleFacebookLike:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: facebook_like
        properties:
          type: object
          properties:
            facebook_like_url:
              type: string
          required:
            - facebook_like_url
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Facebook Like
    RuleTwitterFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: twitter_follow
        properties:
          type: object
          properties:
            twitter_handle:
              type: string
          required:
            - twitter_handle
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Twitter follow
    RuleInstagramFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_follow
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
          required:
            - instagram_handle
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Instagram follow
    RuleInstagramMention:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_mention
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
          required:
            - instagram_handle
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Instagram mention
    RuleInstagramPostHashtag:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_post_hashtag
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
            hashtag:
              type: string
          required:
            - instagram_handle
            - hashtag
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Instagram post hashtag
    RuleTiktokFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: tiktok_follow
        properties:
          type: object
          properties:
            tiktok_handle:
              type: string
          required:
            - tiktok_handle
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Tiktok follow
    RuleTiktokPostHashtag:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: tiktok_post_hashtag
        properties:
          type: object
          properties:
            hashtag:
              type: string
          required:
            - hashtag
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Tiktok post hashtag
    RuleReferral:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: referral
        properties:
          type: object
          properties:
            trigger:
              type: string
              enum:
                - any_purchase
                - qualifying_purchase
          required:
            - trigger
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Referral
    RuleClickthrough:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: clickthrough
        properties:
          type: object
          properties:
            destination_url:
              type: string
          required:
            - destination_url
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Clickthrough
    RuleRetailPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: retail_purchase
        variants:
          description: >-
            A list of variants for this rule. Some aspects of a rule, such as
            its outcome and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this rule variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this rule. For example, 'Make a
                  purchase' or 'Refer a friend'
                example: Make a purchase
              enabled:
                type: boolean
                description: >-
                  Indicates if this rule variant is enabled. For example, some
                  rules are only available for certain tiers
              result:
                oneOf:
                  - $ref: '#/components/schemas/RuleResultPoints'
                    title: Points
                  - $ref: '#/components/schemas/RuleResultReward'
                    title: Reward
                description: >-
                  The result of completing this rule. Will be one of `points`
                  (points are awarded to the customer), or `reward` (a reward is
                  immediately granted, such as a cart discount voucher)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points:
                      $ref: '#/components/schemas/RuleResultPoints'
                    reward:
                      $ref: '#/components/schemas/RuleResultReward'
              result_short_text:
                type: string
                description: >-
                  Short, localized text indicating the result of completing this
                  rule variant. For example: '100 points', '5 points per $1', or
                  '$5 voucher'
                example: 5 points per $1
            required:
              - tier_id
              - title
              - enabled
              - result
              - result_short_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - variants
      additionalProperties: false
      title: Retail purchase
    RewardGiftCard:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: gift_card
        properties:
          type: object
          properties:
            initial_balance:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: The initial balance of the gift card
          required:
            - initial_balance
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Gift card
      description: >-
        A gift card that can be used for future orders until its balance runs
        out
    RewardCartDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: cart_discount_voucher
        properties:
          type: object
          properties:
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: The type of discount this voucher will apply to the cart
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to the cart. For `fixed` discounts
                this will be the currency amount. For `percentage` discounts, it
                will be a number from `1-100`
            applies_to_order_type:
              type: string
              enum:
                - all
                - one_time
                - subscription
              description: >-
                The type of order that this voucher will apply to. One of: `all`
                (applies to all types of order), `one_time` (applies to one-time
                orders), `subscription` (applies to subscription orders)
              example: one_time
            recurring_cycle_limit:
              description: >-
                The number of orders this discount will apply to, for discounts
                that can apply to subscription orders. If it's `1`, it means the
                discount will apply only to the first order with which it is
                used. If `null`, the discount will be applied to any number of
                orders for as long as it is active
              example: 1
              type:
                - number
                - 'null'
            supports_active_subscriptions:
              description: >-
                Whether or not this discount will also be able to be applied to
                active subscriptions in Recharge. If true, we will create a
                Recharge discount in addition to a Shopify discount whenever
                this reward is claimed.
              type: boolean
            minimum_spend:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: The minimum spend, if any, for the voucher to apply to the cart
              example:
                amount: 10
                formatted: $10
          required:
            - discount_type
            - discount
            - applies_to_order_type
            - recurring_cycle_limit
            - minimum_spend
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Cart discount voucher
      description: >-
        A discount voucher that applies a reduction to the total cost of an
        order
    RewardCartVariableDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: cart_variable_discount_voucher
        properties:
          type: object
          properties:
            minimum_discount:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: >-
                The minimum discount that can be selected, e.g. 1 for a minimum
                of $1
            maximum_discount:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: >-
                The maximum discount that can be selected, e.g. 5 for a maximum
                of $5
            minimum_spend_before_discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                The required minimum spend in cart before the reward can be
                redeemed
              example:
                amount: 10
                formatted: $10
            minimum_spend_after_discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                Only allow redemption of a discount value that would leave the
                cart total above this amount
              example:
                amount: 10
                formatted: $10
            applies_to_order_type:
              type: string
              enum:
                - all
                - one_time
                - subscription
              description: >-
                The type of order that this voucher will apply to. One of: `all`
                (applies to all types of order), `one_time` (applies to one-time
                orders), `subscription` (applies to subscription orders)
              example: one_time
          required:
            - minimum_discount
            - maximum_discount
            - minimum_spend_before_discount
            - minimum_spend_after_discount
            - applies_to_order_type
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Cart variable discount
      description: >-
        A variable-amount discount, e.g. 100 points per $1 discount. This is
        typically used during checkout to allow shoppers to use points to apply
        a discount to their cart
    RewardFreeShippingVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: free_shipping_voucher
        properties:
          type: object
          properties:
            max_shipping:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                Free shipping will only be applied if the shipping rate is equal
                to or less than this amount, or `null` if there is no maximum
          required:
            - max_shipping
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Free shipping voucher
      description: A voucher that applies free shipping to an order
    RewardProductDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: product_discount_voucher
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                image_url:
                  type:
                    - string
                    - 'null'
                variant_id:
                  description: >-
                    The variant ID to apply the discount to. If `null`, the
                    discount can be applied to all this product's variants
                  type:
                    - string
                    - 'null'
              required:
                - id
                - image_url
                - variant_id
              additionalProperties: false
              description: The product that this discount applies to
            discount:
              type: object
              properties:
                percentage:
                  type: number
                formatted:
                  type: string
              required:
                - percentage
                - formatted
              additionalProperties: false
              description: >-
                The discount that will apply to the product. Product discounts
                are always percentage based, so this will be a number from
                `1-100`
          required:
            - product
            - discount
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Product discount voucher
      description: A discount voucher that applies a reduction to a specific product
    RewardCollectionDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: collection_discount_voucher
        properties:
          type: object
          properties:
            collection:
              type: object
              properties:
                id:
                  type: string
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - title
                - url
              additionalProperties: false
              description: The collection that this discount applies to
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: >-
                The type of discount this voucher will apply to items in the
                collection
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to items in the collection. For
                `fixed` discounts this will be the currency amount. For
                `percentage` discounts, it will be a number from `1-100`
            minimum_spend:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: The minimum spend, if any, for the voucher to apply to the cart
              example:
                amount: 10
                formatted: $10
          required:
            - collection
            - discount_type
            - discount
            - minimum_spend
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Collection discount voucher
      description: >-
        A discount voucher that applies a reduction to one or more items in a
        collection
    RewardProductCart:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: product_cart
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                handle:
                  type:
                    - string
                    - 'null'
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
                image_url:
                  type:
                    - string
                    - 'null'
                variants:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      inventory_count:
                        description: >-
                          The current inventory count of this product variant,
                          or `null` if inventory is not tracked. If the count is
                          zero, you should ensure it is not selectable by
                          customers when redeeming the reward
                        type:
                          - integer
                          - 'null'
                      sort_key:
                        type: number
                    required:
                      - id
                      - title
                      - inventory_count
                      - sort_key
                    additionalProperties: false
              required:
                - id
                - handle
                - title
                - url
                - image_url
                - variants
              additionalProperties: false
              description: >-
                The product that can be added to the cart. If the product has
                more than one variant, the shopper should be able to choose
                which one to redeem
            max_redemptions_per_cart:
              description: >-
                The maximum number of times this product can be redeemed per
                cart, or `null` if there is no limit
              type:
                - integer
                - 'null'
            cart_requirements:
              type: object
              properties:
                minimum_cart_total:
                  anyOf:
                    - type: object
                      properties:
                        amount:
                          type: number
                        formatted:
                          type: string
                      required:
                        - amount
                        - formatted
                      additionalProperties: false
                    - type: 'null'
                  description: >-
                    The cart total must be equal to or greater than this amount,
                    or `null` if there is no minimum total
                minimum_line_item_count:
                  description: >-
                    The cart must contain at least this number of line items, or
                    `null` if there is no required line item count
                  type:
                    - number
                    - 'null'
              required:
                - minimum_cart_total
                - minimum_line_item_count
              additionalProperties: false
              description: >-
                Cart requirements that must be met before the reward can be
                redeemed
          required:
            - product
            - max_redemptions_per_cart
            - cart_requirements
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Product cart
      description: A free product that is added to the cart
    RewardActiveSubscriptionDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: active_subscription_discount_voucher
        properties:
          type: object
          properties:
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: The type of discount this voucher will apply to next order
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to the next order. For `fixed`
                discounts this will be the currency amount. For `percentage`
                discounts, it will be a number from `1-100`
            recurring_cycle_limit:
              description: >-
                The number of recurring orders this discount will apply to. If
                `null`, the discount will be applied to any number of orders for
                as long as it is active
              type:
                - number
                - 'null'
          required:
            - discount_type
            - discount
            - recurring_cycle_limit
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Active subscription discount voucher
      description: >-
        A discount that is applied to one or more upcoming recurring
        subscription orders
    RewardActiveSubscriptionProduct:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: active_subscription_product
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                handle:
                  type:
                    - string
                    - 'null'
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
                image_url:
                  type:
                    - string
                    - 'null'
                variants:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      inventory_count:
                        description: >-
                          The current inventory count of this product variant,
                          or `null` if inventory is not tracked. If the count is
                          zero, you should ensure it is not selectable by
                          customers when redeeming the reward
                        type:
                          - integer
                          - 'null'
                      sort_key:
                        type: number
                    required:
                      - id
                      - title
                      - inventory_count
                      - sort_key
                    additionalProperties: false
              required:
                - id
                - handle
                - title
                - url
                - image_url
                - variants
              additionalProperties: false
              description: >-
                The product that can be added to an active subscription. If the
                product has more than one variant, the shopper should be able to
                choose which one to redeem
          required:
            - product
          additionalProperties: false
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Active subscription product
      description: A free product that is added to the next recurring subscription order
    RewardCustom:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: custom
        properties:
          oneOf:
            - type: object
              properties:
                fulfillment_type:
                  type: string
                  const: store_fulfillment
                  description: >-
                    Fulfilled by the merchant — manually or via webhook (see
                    `fulfillment_method`).
                fulfillment_method:
                  type: string
                  enum:
                    - manual
                    - webhook
                  description: How the merchant fulfils this custom reward.
                fulfillment_webhook_url:
                  description: >-
                    The URL to which we'll send a webhook for reward
                    fulfillment, if one is configured
                  type:
                    - string
                    - 'null'
              required:
                - fulfillment_type
                - fulfillment_method
                - fulfillment_webhook_url
              additionalProperties: false
            - type: object
              properties:
                fulfillment_type:
                  type: string
                  const: voucher
                  description: >-
                    Fulfilled by issuing a code from a merchant-uploaded pool to
                    the customer at claim time.
              required:
                - fulfillment_type
              additionalProperties: false
          type: object
        variants:
          description: >-
            A list of variants for this reward. Some aspects of a reward, such
            as its cost and whether it's enabled, can vary based on tier
          type: array
          items:
            type: object
            properties:
              tier_id:
                description: >-
                  The tier ID to which this reward variant applies. This will
                  always be `null` if the program does not have tiers enabled
                type:
                  - number
                  - 'null'
              title:
                type: string
                description: >-
                  Short, localized title for this reward. For example, '$5
                  voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                  orders'
                example: $5 voucher
              enabled:
                type: boolean
                description: >-
                  Indicates if this reward variant is enabled. For example, some
                  rewards are only available for certain tiers
              cost:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: fixed
                      points:
                        type: number
                    required:
                      - kind
                      - points
                    additionalProperties: false
                    title: Fixed cost
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: variable
                      unit:
                        type: string
                        const: discount_amount
                      points_per_unit:
                        type: number
                    required:
                      - kind
                      - unit
                      - points_per_unit
                    additionalProperties: false
                    title: Variable cost
                description: >-
                  The cost of this reward in points. Will be one of `fixed`
                  (costs a fixed number of points) or `variable` (cost is
                  multiplied by unit, e.g. 100 points per $1 discount)
              cost_text:
                type: string
                description: >-
                  Short, localized text indicating the cost of this reward. For
                  example, '100 points' or '10 points per $1'
                example: 100 points
            required:
              - tier_id
              - title
              - enabled
              - cost
              - cost_text
            additionalProperties: false
      required:
        - id
        - limit
        - kind
        - properties
        - variants
      additionalProperties: false
      title: Custom
      description: >-
        A custom reward that is fulfilled by the merchant manually or using a
        webhook, or by issuing a code from a merchant-uploaded pool
    RuleResultPoints:
      type: object
      properties:
        kind:
          type: string
          const: points
        per_currency_unit:
          description: >-
            Indicates if the points value is per currency unit. For example, if
            a rule provides 5 points for every $1 spent, this will be `1`. If
            `null`, the points value is exact
          example: 1
          type:
            - number
            - 'null'
        points:
          type: number
          description: >-
            The number of points provided when this rule variant is completed.
            If `per_currency_unit` is not null, this will be the number of
            points per currency unit (e.g. 5 points per $1)
          example: 5
      required:
        - kind
        - per_currency_unit
        - points
      additionalProperties: false
    RuleResultReward:
      type: object
      properties:
        kind:
          type: string
          const: reward
        reward:
          type: object
          properties:
            kind:
              type: string
              enum:
                - gift_card
                - cart_discount_voucher
                - cart_variable_discount_voucher
                - free_shipping_voucher
                - product_discount_voucher
                - collection_discount_voucher
                - product_cart
                - active_subscription_discount_voucher
                - active_subscription_product
                - custom
            title:
              type: string
          required:
            - kind
            - title
          additionalProperties: false
      required:
        - kind
        - reward
      additionalProperties: false
  responses:
    ClientErrorBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - message
            required:
              - error
  securitySchemes:
    ProgramApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key linked to a Program in LoyaltyLion, with a set of permissions
        (scopes). API keys can be created manually, or acquired through an
        OAuth2 flow. The API key should be provided as a `Bearer` token in the
        `Authorization` header

````