> ## Documentation Index
> Fetch the complete documentation index at: https://loyalty-interchange.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get program, tier, and reward definitions



## OpenAPI

````yaml /api-reference/openapi.yaml post /programs/get
openapi: 3.1.2
info:
  title: Loyalty Interchange Protocol
  version: 0.1.0
  description: Vendor-neutral loyalty transaction API with the foodservice/1.0 profile.
  license:
    name: Apache-2.0
    identifier: Apache-2.0
servers:
  - url: https://loyalty.example.com/lip/v1
security:
  - bearerAuth: []
tags:
  - name: Discovery
  - name: Programs
  - name: Accounts
  - name: Ledger
  - name: Members
  - name: Orders
  - name: Accruals
  - name: Redemptions
  - name: Issued Rewards
paths:
  /programs/get:
    post:
      tags:
        - Programs
      summary: Get program, tier, and reward definitions
      operationId: getProgram
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProgramGetRequest'
      responses:
        '200':
          description: Get program, tier, and reward definitions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProgramGetResponse'
        default:
          $ref: '#/components/responses/Problem'
components:
  schemas:
    ProgramGetRequest:
      title: ProgramGetRequest
      additionalProperties: false
      type: object
      required:
        - context
        - program_id
      properties:
        context:
          additionalProperties: false
          type: object
          required:
            - protocol_version
            - profile
            - request_id
            - idempotency_key
            - occurred_at
            - source
          properties:
            protocol_version:
              const: '1.0'
              type: string
            profile:
              const: foodservice/1.0
              type: string
            request_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            idempotency_key:
              minLength: 8
              maxLength: 255
              type: string
            occurred_at:
              format: date-time
              type: string
            source:
              additionalProperties: false
              type: object
              required:
                - system
              properties:
                system:
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                  description: Opaque, stable identifier within the owning system.
                  type: string
                instance:
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                  description: Opaque, stable identifier within the owning system.
                  type: string
        program_id:
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
          description: Opaque, stable identifier within the owning system.
          type: string
    ProgramGetResponse:
      title: ProgramGetResponse
      additionalProperties: false
      type: object
      required:
        - context
        - program
      properties:
        context:
          additionalProperties: false
          type: object
          required:
            - protocol_version
            - profile
            - request_id
            - processed_at
          properties:
            protocol_version:
              const: '1.0'
              type: string
            profile:
              const: foodservice/1.0
              type: string
            request_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: >-
                Echoes the request's request_id. On an idempotent replay it
                echoes the replaying request's request_id, not the original.
              type: string
            processed_at:
              format: date-time
              type: string
        program:
          additionalProperties: false
          type: object
          required:
            - program_id
            - name
            - currency
            - earning
            - accounts
            - metrics
            - tiers
            - rewards
          properties:
            program_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            name:
              minLength: 1
              maxLength: 255
              type: string
            description:
              minLength: 1
              maxLength: 2000
              type: string
            currency:
              pattern: ^[A-Z]{3}$
              type: string
            earning:
              additionalProperties: false
              type: object
              required:
                - rate
                - minimum_eligible_spend
                - eligible_channels
                - rounding
                - exclusions
              properties:
                rate:
                  additionalProperties: false
                  type: object
                  required:
                    - unit
                    - amount
                    - spend
                  properties:
                    unit:
                      anyOf:
                        - const: points
                          type: string
                        - const: visits
                          type: string
                        - const: stamps
                          type: string
                        - const: credits
                          type: string
                        - const: custom
                          type: string
                    amount:
                      minimum: 0
                      type: integer
                    spend:
                      additionalProperties: false
                      type: object
                      required:
                        - amount
                        - currency
                      properties:
                        amount:
                          minimum: 1
                          type: integer
                        currency:
                          pattern: ^[A-Z]{3}$
                          type: string
                minimum_eligible_spend:
                  additionalProperties: false
                  type: object
                  required:
                    - amount
                    - currency
                  properties:
                    amount:
                      minimum: 0
                      type: integer
                    currency:
                      pattern: ^[A-Z]{3}$
                      type: string
                eligible_channels:
                  minItems: 1
                  uniqueItems: true
                  type: array
                  items:
                    anyOf:
                      - const: counter
                        type: string
                      - const: drive_thru
                        type: string
                      - const: kiosk
                        type: string
                      - const: web
                        type: string
                      - const: mobile
                        type: string
                      - const: pickup
                        type: string
                      - const: delivery
                        type: string
                      - const: catering
                        type: string
                      - const: third_party
                        type: string
                      - const: other
                        type: string
                rounding:
                  const: after_transaction
                  type: string
                exclusions:
                  additionalProperties: false
                  type: object
                  required:
                    - product_ids
                    - category_ids
                    - tags
                    - line_kinds
                  properties:
                    product_ids:
                      uniqueItems: true
                      type: array
                      items:
                        minLength: 1
                        maxLength: 128
                        pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                        description: Opaque, stable identifier within the owning system.
                        type: string
                    category_ids:
                      uniqueItems: true
                      type: array
                      items:
                        minLength: 1
                        maxLength: 128
                        pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                        description: Opaque, stable identifier within the owning system.
                        type: string
                    tags:
                      uniqueItems: true
                      type: array
                      items:
                        minLength: 1
                        maxLength: 64
                        type: string
                    line_kinds:
                      uniqueItems: true
                      type: array
                      items:
                        anyOf:
                          - const: item
                            type: string
                          - const: modifier
                            type: string
                          - const: fee
                            type: string
            account_earning:
              minItems: 1
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - unit
                  - mode
                  - amount
                  - multiplier_eligible
                properties:
                  unit:
                    anyOf:
                      - const: points
                        type: string
                      - const: visits
                        type: string
                      - const: stamps
                        type: string
                      - const: credits
                        type: string
                      - const: custom
                        type: string
                  mode:
                    anyOf:
                      - const: spend
                        type: string
                      - const: per_order
                        type: string
                  amount:
                    minimum: 0
                    type: integer
                  spend:
                    additionalProperties: false
                    type: object
                    required:
                      - amount
                      - currency
                    properties:
                      amount:
                        minimum: 1
                        type: integer
                      currency:
                        pattern: ^[A-Z]{3}$
                        type: string
                  multiplier_eligible:
                    type: boolean
            accounts:
              minItems: 1
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - unit
                  - is_primary
                properties:
                  unit:
                    anyOf:
                      - const: points
                        type: string
                      - const: visits
                        type: string
                      - const: stamps
                        type: string
                      - const: credits
                        type: string
                      - const: custom
                        type: string
                  unit_label:
                    minLength: 1
                    maxLength: 64
                    type: string
                  is_primary:
                    type: boolean
            metrics:
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - metric_id
                  - name
                  - unit
                properties:
                  metric_id:
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                    description: Opaque, stable identifier within the owning system.
                    type: string
                  name:
                    minLength: 1
                    maxLength: 255
                    type: string
                  description:
                    minLength: 1
                    maxLength: 1000
                    type: string
                  unit:
                    anyOf:
                      - const: points
                        type: string
                      - const: visits
                        type: string
                      - const: stamps
                        type: string
                      - const: credits
                        type: string
                      - const: custom
                        type: string
            tiers:
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - tier_id
                  - name
                  - qualification_metric_id
                  - minimum
                  - benefits
                properties:
                  tier_id:
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                    description: Opaque, stable identifier within the owning system.
                    type: string
                  name:
                    minLength: 1
                    maxLength: 255
                    type: string
                  qualification_metric_id:
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                    description: Opaque, stable identifier within the owning system.
                    type: string
                  minimum:
                    minimum: 0
                    type: integer
                  earn_multiplier_bps:
                    minimum: 0
                    maximum: 1000000
                    type: integer
                  benefits:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      required:
                        - benefit_id
                        - name
                      properties:
                        benefit_id:
                          minLength: 1
                          maxLength: 128
                          pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                          description: Opaque, stable identifier within the owning system.
                          type: string
                        name:
                          minLength: 1
                          maxLength: 255
                          type: string
                        description:
                          minLength: 1
                          maxLength: 1000
                          type: string
                        metadata:
                          description: >-
                            Non-normative extension data. Consumers must ignore
                            unknown keys.
                          type: object
                          patternProperties:
                            ^(.*)$: {}
            tier_policy:
              additionalProperties: false
              type: object
              required:
                - metric_id
                - period
              properties:
                metric_id:
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                  description: Opaque, stable identifier within the owning system.
                  type: string
                period:
                  additionalProperties: false
                  type: object
                  required:
                    - type
                    - starts_month
                    - starts_day
                    - time_zone
                  properties:
                    type:
                      const: annual
                      type: string
                    starts_month:
                      minimum: 1
                      maximum: 12
                      type: integer
                    starts_day:
                      minimum: 1
                      maximum: 31
                      type: integer
                    time_zone:
                      minLength: 1
                      maxLength: 255
                      type: string
                effective_from:
                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                  type: string
            point_expiration:
              additionalProperties: false
              type: object
              required:
                - type
                - days
                - warning_days
              properties:
                type:
                  const: after_earned
                  type: string
                days:
                  minimum: 1
                  maximum: 36500
                  type: integer
                warning_days:
                  uniqueItems: true
                  type: array
                  items:
                    minimum: 1
                    maximum: 36500
                    type: integer
            rewards:
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - reward_id
                  - name
                  - cost
                  - effect
                  - funding
                properties:
                  reward_id:
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                    description: Opaque, stable identifier within the owning system.
                    type: string
                  name:
                    minLength: 1
                    maxLength: 255
                    type: string
                  description:
                    minLength: 1
                    maxLength: 1000
                    type: string
                  image_url:
                    format: uri-reference
                    maxLength: 2048
                    type: string
                  cost:
                    additionalProperties: false
                    type: object
                    required:
                      - unit
                      - amount
                    properties:
                      unit:
                        anyOf:
                          - const: points
                            type: string
                          - const: visits
                            type: string
                          - const: stamps
                            type: string
                          - const: credits
                            type: string
                          - const: custom
                            type: string
                      amount:
                        minimum: 0
                        type: integer
                  effect:
                    anyOf:
                      - additionalProperties: false
                        type: object
                        required:
                          - type
                          - target
                          - amount
                          - allocations
                        properties:
                          type:
                            const: discount
                            type: string
                          target:
                            anyOf:
                              - const: order
                                type: string
                              - const: line
                                type: string
                          amount:
                            additionalProperties: false
                            type: object
                            required:
                              - amount
                              - currency
                            properties:
                              amount:
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                description: Signed amount in the currency's minor unit.
                                type: integer
                              currency:
                                pattern: ^[A-Z]{3}$
                                type: string
                          allocations:
                            minItems: 1
                            type: array
                            items:
                              additionalProperties: false
                              type: object
                              required:
                                - amount
                              properties:
                                line_id:
                                  minLength: 1
                                  maxLength: 128
                                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                                  description: >-
                                    Opaque, stable identifier within the owning
                                    system.
                                  type: string
                                amount:
                                  additionalProperties: false
                                  type: object
                                  required:
                                    - amount
                                    - currency
                                  properties:
                                    amount:
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                      description: >-
                                        Signed amount in the currency's minor
                                        unit.
                                      type: integer
                                    currency:
                                      pattern: ^[A-Z]{3}$
                                      type: string
                      - additionalProperties: false
                        type: object
                        required:
                          - type
                          - max_quantity
                          - max_value
                        properties:
                          type:
                            const: free_item
                            type: string
                          product_ids:
                            minItems: 1
                            uniqueItems: true
                            type: array
                            items:
                              minLength: 1
                              maxLength: 128
                              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                              description: >-
                                Opaque, stable identifier within the owning
                                system.
                              type: string
                          category_ids:
                            minItems: 1
                            uniqueItems: true
                            type: array
                            items:
                              minLength: 1
                              maxLength: 128
                              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                              description: >-
                                Opaque, stable identifier within the owning
                                system.
                              type: string
                          max_quantity:
                            minimum: 1
                            type: integer
                          max_value:
                            additionalProperties: false
                            type: object
                            required:
                              - amount
                              - currency
                            properties:
                              amount:
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                description: Signed amount in the currency's minor unit.
                                type: integer
                              currency:
                                pattern: ^[A-Z]{3}$
                                type: string
                      - additionalProperties: false
                        type: object
                        required:
                          - type
                          - effect_type
                          - payload
                        properties:
                          type:
                            const: custom
                            type: string
                          effect_type:
                            minLength: 1
                            maxLength: 255
                            type: string
                          payload: {}
                  funding:
                    minItems: 1
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      required:
                        - party_id
                        - party_type
                        - share_bps
                      properties:
                        party_id:
                          minLength: 1
                          maxLength: 128
                          pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                          description: Opaque, stable identifier within the owning system.
                          type: string
                        party_type:
                          anyOf:
                            - const: brand
                              type: string
                            - const: franchisee
                              type: string
                            - const: location
                              type: string
                            - const: merchant
                              type: string
                            - const: partner
                              type: string
                        share_bps:
                          minimum: 1
                          maximum: 10000
                          type: integer
                        amount:
                          additionalProperties: false
                          type: object
                          required:
                            - amount
                            - currency
                          properties:
                            amount:
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              description: Signed amount in the currency's minor unit.
                              type: integer
                            currency:
                              pattern: ^[A-Z]{3}$
                              type: string
                  available_from:
                    format: date-time
                    type: string
                  available_until:
                    format: date-time
                    type: string
                  metadata:
                    description: >-
                      Non-normative extension data. Consumers must ignore
                      unknown keys.
                    type: object
                    patternProperties:
                      ^(.*)$: {}
            metadata:
              description: >-
                Non-normative extension data. Consumers must ignore unknown
                keys.
              type: object
              patternProperties:
                ^(.*)$: {}
    ProblemDetails:
      title: ProblemDetails
      additionalProperties: true
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          format: uri-reference
          type: string
        title:
          minLength: 1
          type: string
        status:
          minimum: 400
          maximum: 599
          type: integer
        detail:
          type: string
        instance:
          format: uri-reference
          type: string
        code:
          minLength: 1
          maxLength: 128
          type: string
        errors:
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - path
              - message
            properties:
              path:
                type: string
              message:
                type: string
  responses:
    Problem:
      description: RFC 9457 problem details
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````