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

# List rewards

> Returns a cursor-paginated list of rewards. Returns `ACTIVE`, `INACTIVE`, and `DRAFT` rewards. `DELETED` rewards are not returned.

Results can be filtered by ID, name, type and creation date. Results can be ordered by creation date or name (ascending or descending). The same field cannot be ordered both ascending and descending at the same time.

A successful call records no activity.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/rewards
openapi: 3.1.0
info:
  title: Voucherify API - Loyalty v2
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v2/loyalties/rewards:
    get:
      tags:
        - Rewards
      summary: List rewards
      description: >-
        Returns a cursor-paginated list of rewards. Returns `ACTIVE`,
        `INACTIVE`, and `DRAFT` rewards. `DELETED` rewards are not returned.


        Results can be filtered by ID, name, type and creation date. Results can
        be ordered by creation date or name (ascending or descending). The same
        field cannot be ordered both ascending and descending at the same time.


        A successful call records no activity.
      operationId: listRewards
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Limits the page size to an integer from 1 to 100. Defaults to 10. A
            numeric string is accepted and rounded to the nearest integer.
          schema:
            type:
              - number
              - string
              - 'null'
            minimum: 1
            maximum: 100
            default: 10
        - name: order
          in: query
          required: false
          description: >-
            Orders the results. Accepts one value or an array. Prefix a field
            with `-` for descending order. Defaults to `-created_at`. The same
            field cannot be used in both directions. Rows with the same sort
            value are then ordered by `id` ascending.
          schema:
            oneOf:
              - type: array
                items:
                  type: string
                  enum:
                    - '-created_at'
                    - created_at
                    - name
                    - '-name'
              - type: string
                enum:
                  - '-created_at'
                  - created_at
                  - name
                  - '-name'
              - type: 'null'
        - name: cursor
          in: query
          required: false
          description: >-
            Continues pagination. Pass the `cursor.next` value from a previous
            response. Format `lcrsrew_[a-f0-9]+`. The cursor matches the filters
            and order of that response.
          schema:
            type:
              - string
              - 'null'
            pattern: ^lcrsrew_[a-f0-9]+$
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Filters the results. Pass a deep object, for example
            `filters[name][conditions][$contains]=gift`. Fields combine through
            `junction`, which defaults to `AND`. Omit `filters` to apply no
            field filter.
          schema:
            oneOf:
              - $ref: '#/components/schemas/LoyaltiesRewardsListRequestQuery'
              - type: 'null'
      responses:
        '200':
          description: Cursor-paginated list of rewards.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2LoyaltiesRewardsListResponseBody'
              examples:
                Reward list:
                  value:
                    data:
                      - id: lrew_1367ec2e89cdf68e58
                        name: Reward 2026-11-26-01
                        type: DIGITAL
                        status: DRAFT
                        start_date: '2026-12-30T00:00:00.000Z'
                        end_date: '2027-12-31T00:00:00.000Z'
                        validity_hours:
                          type: DAILY
                          daily:
                            - days_of_week:
                                - 0
                              start_time: '09:00'
                              end_time: '17:00'
                        digital:
                          type: DISCOUNT_COUPONS
                          discount_coupons:
                            campaign_id: camp_UbKXk7BgChqEc0fCYUuN1cS2
                        refunds:
                          type: NONE
                        costs:
                          - id: lrcst_1367ec2e87cdf68e56
                            spending:
                              - id: lrspn_1367ec2e87cdf68e57
                                points: 250
                                card_definition_id: lcdef_128f495f720c4bec8c
                            tier_rules:
                              type: NO_REQUIREMENTS
                        purchase_limits:
                          cooldown:
                            type: NO_COOLDOWN
                          frequency:
                            type: NO_LIMIT
                            limits: []
                        metadata: {}
                        created_at: '2026-11-26T16:47:21.126Z'
                        updated_at: '2026-12-01T11:19:40.368Z'
                        object: reward
                      - id: lrew_1365170fb5eee48830
                        name: Reward 2026-11-24
                        type: MATERIAL
                        status: DRAFT
                        start_date: null
                        end_date: null
                        validity_hours:
                          type: ANY_TIME
                        material:
                          type: PRODUCT
                          product:
                            id: prod_12b4cecb4fd5a6402f
                        refunds:
                          type: NONE
                        costs:
                          - id: lrcst_1365170fb46ee4882e
                            spending:
                              - id: lrspn_1365170fb46ee4882f
                                points: 23
                                card_definition_id: lcdef_1331564fab0b1ce713
                            tier_rules:
                              type: NO_REQUIREMENTS
                            name: A
                        purchase_limits:
                          cooldown:
                            type: NO_COOLDOWN
                          frequency:
                            type: NO_LIMIT
                            limits: []
                        metadata: {}
                        created_at: '2026-11-24T11:59:15.159Z'
                        updated_at: null
                        object: reward
                      - id: lrew_1331566e60d24b548a
                        name: Reward 2026-10-15
                        type: MATERIAL
                        status: ACTIVE
                        start_date: null
                        end_date: null
                        validity_hours:
                          type: ANY_TIME
                        material:
                          type: SKU
                          sku:
                            product_id: prod_1294cee5910e4904c3
                            id: sku_12aa7570f59ee4e5ec
                        refunds:
                          type: NONE
                        costs:
                          - id: lrcst_1331566e5a524b5488
                            spending:
                              - id: lrspn_1331566e5a524b5489
                                points: 1
                                card_definition_id: lcdef_1331564fab0b1ce713
                            tier_rules:
                              type: NO_REQUIREMENTS
                        purchase_limits:
                          cooldown:
                            type: NO_COOLDOWN
                          frequency:
                            type: NO_LIMIT
                            limits: []
                        metadata: {}
                        created_at: '2026-10-15T07:15:06.243Z'
                        updated_at: '2026-11-19T19:00:08.710Z'
                        object: reward
                    cursor:
                      next: lcrsrew_136e276fbcda575c94
                      expires_at: '2026-12-01T13:07:07.571Z'
                    object: list
        '400':
          description: >-
            Query parameters failed validation, or the cursor is invalid,
            expired, or does not match this query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Invalid cursor format:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Property .cursor must match pattern "^lcrsrew_[a-f0-9]+$"
                    request_id: v-12f90062450611350a
                Cursor invalid or expired:
                  value:
                    code: 400
                    key: invalid_or_expired_cursor
                    message: Invalid or expired cursor
                    details: The provided cursor is invalid or has expired
                    request_id: v-12f90062450611350b
                Cursor does not match query:
                  value:
                    code: 400
                    key: cursor_and_query_mismatch
                    message: Cursor and query mismatch
                    details: >-
                      The provided cursor does not match the query, either the
                      cursor is invalid or the query has changed
                    request_id: v-12f90062450611350c
                Limit too high:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Property .limit cannot be greater than 100
                    request_id: v-12f90062450611350d
                Limit too low:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Property .limit cannot be lower than 1
                    request_id: v-12f90062450611350e
                Unsupported order value:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .order must be equal to one of the allowed values
                      [ -created_at, created_at, name, -name ]
                    request_id: v-12f90062450611350f
                Conflicting order values:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Query cannot be ordered by 'name' and '-name' at the same
                      time
                    request_id: v-12f9006245061135010
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal server error:
                  value:
                    code: 500
                    key: api_error
                    message: >-
                      Something went wrong. Don't worry, your campaigns are
                      still safe and the Voucherify Team has been notified.
                      Check out our Help Center and forums for help, or head
                      back to home.
      security:
        - X-App-Id: []
          X-App-Token: []
        - bearerAuth: []
components:
  schemas:
    LoyaltiesRewardsListRequestQuery:
      type: object
      description: Request query schema for **GET** `/v2/loyalties/rewards`.
      properties:
        junction:
          description: >-
            Joins the field filters. Allowed values are `AND` and `OR`. Defaults
            to `AND`.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        id:
          oneOf:
            - $ref: '#/components/schemas/LoyaltiesRewardsListRequestQueryId'
            - type: 'null'
        name:
          oneOf:
            - $ref: '#/components/schemas/LoyaltiesRewardsListRequestQueryName'
            - type: 'null'
        type:
          oneOf:
            - $ref: '#/components/schemas/LoyaltiesRewardsListRequestQueryType'
            - type: 'null'
        created_at:
          oneOf:
            - $ref: '#/components/schemas/RewardDateFilter'
            - type: 'null'
      additionalProperties: false
      title: Loyalties Rewards List Request Query
    V2LoyaltiesRewardsListResponseBody:
      title: V2 Loyalties Rewards List Response Body
      type: object
      description: Response body schema for **GET** `/v2/loyalties/rewards`.
      allOf:
        - $ref: '#/components/schemas/RewardListResponse'
    ErrorResponse:
      type: object
      description: Standard error response returned by all Loyalty v2 endpoints.
      properties:
        code:
          type: integer
          description: HTTP status code of the error.
        key:
          type: string
          description: Machine-readable error key.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional details about the error.
        request_id:
          type: string
          description: Unique identifier of the request that produced the error.
        resource_id:
          type: string
          description: Unique identifier of the resource that produced the error.
        resource_type:
          type: string
          description: Type of the resource that produced the error.
    LoyaltiesRewardsListRequestQueryId:
      type: object
      description: >-
        ID filter conditions. `$is`/`$is_not` accept a single value (string or
        1-element array); `$in`/`$not_in` accept a string or an array of 1-100
        values. All values must match the reward ID pattern `^lrew_[a-f0-9]+$`.
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: >-
                Matches one value. A string or a one-element array. Format
                `lrew_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Excludes one value. A string or a one-element array. Format
                `lrew_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 100
                values. Format `lrew_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 100
                values. Format `lrew_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    LoyaltiesRewardsListRequestQueryName:
      type: object
      description: >-
        String filter conditions. `$is`, `$is_not`, `$contains`, `$not_contain`,
        `$starts_with` and `$ends_with` accept a single value (string or
        1-element array); `$in`/`$not_in` accept a string or an array of 1-10
        values; `$has_value` and `$is_unknown` take no meaningful value (string
        or array with at most 1 item).
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: Matches one value. A string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: Excludes one value. A string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $contains:
              description: >-
                Matches when the value contains the substring. A string or a
                one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $not_contain:
              description: >-
                Excludes values that contain the substring. A string or a
                one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $starts_with:
              description: >-
                Matches when the value starts with the prefix. A string or a
                one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $ends_with:
              description: >-
                Matches when the value ends with the suffix. A string or a
                one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10
                - type: 'null'
            $has_value:
              description: Matches when the field is set. The condition value is ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
            $is_unknown:
              description: >-
                Matches when the field is not set. The condition value is
                ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    LoyaltiesRewardsListRequestQueryType:
      type: object
      description: >-
        Enum filter conditions for the reward `type` field. Allowed values are
        `MATERIAL` and `DIGITAL`. `$is`/`$is_not` accept a single value (string
        or 1-element array); `$in`/`$not_in` accept a string or an array of 1-10
        values.
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: Matches one value. A string or a one-element array.
              oneOf:
                - type: string
                  enum:
                    - MATERIAL
                    - DIGITAL
                - type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    enum:
                      - MATERIAL
                      - DIGITAL
                - type: 'null'
            $is_not:
              description: Excludes one value. A string or a one-element array.
              oneOf:
                - type: string
                  enum:
                    - MATERIAL
                    - DIGITAL
                - type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    enum:
                      - MATERIAL
                      - DIGITAL
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                  enum:
                    - MATERIAL
                    - DIGITAL
                - type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    enum:
                      - MATERIAL
                      - DIGITAL
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                  enum:
                    - MATERIAL
                    - DIGITAL
                - type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    enum:
                      - MATERIAL
                      - DIGITAL
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    RewardDateFilter:
      type: object
      description: >-
        Date filter conditions. `$before`/`$after` accept an ISO-8601 date
        string (or a 1-element array of one); `$is`, `$more_than` and
        `$less_than` accept a non-negative integer value passed as a string;
        `$has_value` and `$is_unknown` take no meaningful value.
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $before:
              description: >-
                Matches dates before the given value. An ISO 8601 date-time, as
                a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $after:
              description: >-
                Matches dates after the given value. An ISO 8601 date-time, as a
                string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is:
              description: >-
                Matches a date exactly the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $more_than:
              description: >-
                Matches dates more than the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $less_than:
              description: >-
                Matches dates less than the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $has_value:
              description: Matches when the field is set. The condition value is ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
            $is_unknown:
              description: >-
                Matches when the field is not set. The condition value is
                ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    RewardListResponse:
      type: object
      description: Cursor-paginated list of rewards.
      properties:
        data:
          type: array
          description: The rewards on the current page.
          items:
            $ref: '#/components/schemas/RewardResponse'
        cursor:
          description: Pagination cursor, or `null` when there are no more results.
          oneOf:
            - $ref: '#/components/schemas/RewardListCursor'
            - type: 'null'
        object:
          type: string
          const: list
          description: Object type marker; always `list`.
      required:
        - data
        - cursor
        - object
    RewardResponse:
      type: object
      description: A reward, as returned by the API.
      properties:
        id:
          type: string
          pattern: ^lrew_[a-f0-9]+$
          description: Unique reward identifier, prefixed with `lrew_`.
        name:
          type: string
          description: Display name of the reward.
        type:
          type: string
          enum:
            - MATERIAL
            - DIGITAL
          description: Reward type.
        status:
          type: string
          enum:
            - ACTIVE
            - DRAFT
            - INACTIVE
            - DELETED
          description: Current lifecycle status of the reward.
        start_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Date from which the reward is available, or `null` when not set.
        end_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Date until which the reward is available, or `null` when not set.
        validity_hours:
          $ref: '#/components/schemas/RewardValidityHoursResponse'
          description: >-
            Hours during which the reward can be purchased. Always present.
            Defaults to `{"type": "ANY_TIME"}`.
        material:
          $ref: '#/components/schemas/RewardMaterialResponse'
          description: >-
            Material reward definition. Present only when `type` is `MATERIAL`.
            Omitted otherwise.
        digital:
          $ref: '#/components/schemas/RewardDigitalResponse'
          description: >-
            Digital reward definition. Present only when `type` is `DIGITAL`.
            Omitted otherwise.
        refunds:
          $ref: '#/components/schemas/LoyaltyV2ActivityRewardRefunds'
          description: 'Refund policy. Always present. Defaults to `{ "type": "NONE" }`.'
        costs:
          type: array
          description: Point costs of the reward. Empty array when no costs are defined.
          items:
            $ref: '#/components/schemas/RewardCostResponse'
        purchase_limits:
          $ref: '#/components/schemas/RewardPurchaseLimits'
          description: >-
            Purchase limits. Always present. Defaults to `{"cooldown": { "type":
            "NO_COOLDOWN"}, "frequency": {"type": "NO_LIMIT", "limits": []}}`.
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata attached to the reward. Empty object
            when not set.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the reward was created (ISO-8601).
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp when the reward was last updated (ISO-8601), or `null`
            when never updated.
        object:
          type: string
          const: reward
          description: Object type marker; always `reward`.
      required:
        - id
        - name
        - type
        - status
        - start_date
        - end_date
        - validity_hours
        - refunds
        - costs
        - purchase_limits
        - metadata
        - created_at
        - updated_at
        - object
    RewardListCursor:
      type: object
      description: Pagination cursor.
      properties:
        next:
          type: string
          description: >-
            Cursor value to pass as the `cursor` query parameter to fetch the
            next page.
        expires_at:
          type: string
          format: date-time
          description: Timestamp when the cursor expires.
      required:
        - next
    RewardValidityHoursResponse:
      type: object
      description: >-
        Validity hours. `daily` is present only when `type` is DAILY. Omitted
        otherwise.
      properties:
        type:
          type: string
          enum:
            - DAILY
            - ANY_TIME
          description: >-
            Whether the reward is purchasable at any time or only during
            specific daily windows.
        daily:
          type: array
          description: Daily time windows. Present only when `type` is DAILY.
          items:
            $ref: >-
              #/components/schemas/LoyaltyV2ActivityRewardValidityDailyHoursResponse
      required:
        - type
    RewardMaterialResponse:
      type: object
      description: Material reward definition.
      properties:
        type:
          type: string
          enum:
            - PRODUCT
            - SKU
          description: Kind of material reward.
        product:
          $ref: '#/components/schemas/LoyaltyV2ActivityRewardMaterialProduct'
          description: >-
            Product delivered by the reward. Present only when `type` is
            `PRODUCT`. Omitted otherwise.
        sku:
          $ref: '#/components/schemas/LoyaltyV2ActivityRewardMaterialSKU'
          description: >-
            SKU delivered by the reward. Present only when `type` is `SKU`.
            Omitted otherwise.
      required:
        - type
    RewardDigitalResponse:
      type: object
      description: >-
        Digital reward definition. Only the object matching `type` is present;
        the others are omitted.
      properties:
        type:
          type: string
          enum:
            - DISCOUNT_COUPONS
            - GIFT_VOUCHERS
            - LOYALTY_CARD_POINTS
          description: Kind of digital reward.
        discount_coupons:
          $ref: '#/components/schemas/LoyaltyV2ActivityRewardDigitalDiscountCoupons'
          description: >-
            Discount coupons configuration. Present only when `type` is
            `DISCOUNT_COUPONS`.
        gift_vouchers:
          $ref: >-
            #/components/schemas/LoyaltyV2ActivityRewardDigitalGiftVouchersResponse
          description: >-
            Gift vouchers configuration. Present only when `type` is
            `GIFT_VOUCHERS`.
        loyalty_card_points:
          $ref: >-
            #/components/schemas/LoyaltyV2ActivityRewardDigitalLoyaltyCardPointsResponse
          description: >-
            Loyalty card points configuration. Present only when `type` is
            `LOYALTY_CARD_POINTS`.
      required:
        - type
    LoyaltyV2ActivityRewardRefunds:
      type: object
      description: Refund policy for the reward.
      properties:
        type:
          type: string
          enum:
            - NONE
            - REFUNDABLE
          description: Whether reward purchases can be refunded.
      required:
        - type
      additionalProperties: false
    RewardCostResponse:
      type: object
      description: >-
        A reward cost. `rules` is omitted when the cost has no rule definitions;
        `spending` is `null` when no spending is defined. `tier_rules` is always
        present and defaults to `NO_REQUIREMENTS`.
      properties:
        id:
          type: string
          pattern: ^lrcst_[a-f0-9]+$
          description: Unique cost identifier, prefixed with `lrcst_`.
        name:
          type:
            - string
            - 'null'
          maxLength: 200
          description: Display name of the cost. Omitted when not set. `null` when cleared.
        rules:
          $ref: '#/components/schemas/RewardCostRuleGroupResponse'
          description: >-
            Rules guarding this cost. Omitted when the cost has no rule
            definitions.
        spending:
          type:
            - array
            - 'null'
          description: Points spending definitions, or `null` when none are defined.
          items:
            $ref: '#/components/schemas/LoyaltyV2ActivityRewardCostSpendingResponse'
        tier_rules:
          $ref: '#/components/schemas/RewardCostTierRulesResponse'
          description: >-
            Defines which tiers can use this cost. Always present. Defaults to
            `NO_REQUIREMENTS`.
      required:
        - id
        - tier_rules
    RewardPurchaseLimits:
      type: object
      description: >-
        Limits on how often a member can purchase the reward. Always present on
        reward responses. Defaults to no cooldown and no frequency limit.
      properties:
        cooldown:
          $ref: '#/components/schemas/RewardPurchaseLimitsCooldown'
          description: Cooldown after a purchase.
        frequency:
          $ref: '#/components/schemas/RewardPurchaseLimitsFrequency'
          description: How many times the reward can be purchased in a period.
      required:
        - cooldown
        - frequency
    LoyaltyV2ActivityRewardValidityDailyHoursResponse:
      type: object
      description: A single daily validity window.
      properties:
        days_of_week:
          type: array
          description: >-
            Days of the week the window applies to, as integers 0-6 (0 =
            Sunday).
          items:
            type: integer
            minimum: 0
            maximum: 6
        start_time:
          type: string
          description: Window start time in `HH:mm` format.
          example: '09:00'
        end_time:
          type: string
          description: Window end time in `HH:mm` format. Omitted when unset.
          example: '17:00'
      required:
        - days_of_week
        - start_time
    LoyaltyV2ActivityRewardMaterialProduct:
      type: object
      description: Product reference for a material reward.
      properties:
        id:
          type: string
          pattern: ^prod_[a-f0-9]+
          description: Product identifier, prefixed with `prod_`.
      required:
        - id
      additionalProperties: false
    LoyaltyV2ActivityRewardMaterialSKU:
      type: object
      description: SKU reference for a material reward.
      properties:
        product_id:
          type: string
          pattern: ^prod_[a-f0-9]+
          description: >-
            Unique identifier of the product the SKU belongs to, prefixed with
            `prod_`.
        id:
          type: string
          pattern: ^sku_[a-f0-9]+
          description: SKU identifier, prefixed with `sku_`.
      required:
        - product_id
        - id
      additionalProperties: false
    LoyaltyV2ActivityRewardDigitalDiscountCoupons:
      type: object
      description: Discount coupons digital reward configuration.
      properties:
        campaign_id:
          type: string
          pattern: ^camp_[a-zA-Z0-9]+
          description: >-
            Unique identifier of the discount coupons campaign to publish a
            coupon from, prefixed with `camp_`.
      required:
        - campaign_id
      additionalProperties: false
    LoyaltyV2ActivityRewardDigitalGiftVouchersResponse:
      type: object
      description: Gift vouchers configuration.
      properties:
        campaign_id:
          type: string
          pattern: ^camp_[a-zA-Z0-9]+
          description: >-
            Unique identifier of the gift vouchers campaign, prefixed with
            `camp_`.
        balance:
          type: number
          description: >-
            Gift card balance credited when the reward is delivered. Value
            present as a positive integer in the smallest currency unit (e.g.
            100 cents for $1.00). Added to the initial gift card balance when
            the gift card is first published.
      required:
        - campaign_id
        - balance
    LoyaltyV2ActivityRewardDigitalLoyaltyCardPointsResponse:
      type: object
      description: Loyalty card points configuration.
      properties:
        points:
          type: integer
          description: Number of points credited when the reward is delivered.
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: >-
            Unique identifier of the card definition points are credited to,
            prefixed with `lcdef_`.
      required:
        - points
        - card_definition_id
    RewardCostRuleGroupResponse:
      type: object
      description: >-
        Rules group. Contains a `logic` formula string plus numbered rule
        definition properties (positive-integer keys).
      properties:
        logic:
          type: string
          description: >-
            Logical formula combining the numbered rule definitions, e.g. `"1
            AND 2"`.
      additionalProperties:
        $ref: '#/components/schemas/RewardCostRuleDefinitionResponse'
        description: >-
          A numbered rule definition. Property names must be positive integers
          matching `^[1-9]\d*$` (for example `1`, `2`).
    LoyaltyV2ActivityRewardCostSpendingResponse:
      type: object
      description: Points spending definition.
      properties:
        id:
          type: string
          pattern: ^lrspn_[a-f0-9]+$
          description: >-
            Unique spending identifier, prefixed with `lrspn_`. Assigned by the
            API when omitted on create/update.
        name:
          type:
            - string
            - 'null'
          maxLength: 200
          description: Optional display name of the spending definition, or `null`.
        points:
          type: integer
          description: Number of points the member must spend.
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: >-
            Unique identifier of the card definition the points are spent from,
            prefixed with `lcdef_`.
      required:
        - id
        - points
        - card_definition_id
    RewardCostTierRulesResponse:
      type: object
      description: >-
        Tier requirements for a reward cost. `any_of` is omitted when `type` is
        `NO_REQUIREMENTS`.
      properties:
        type:
          type: string
          enum:
            - NO_REQUIREMENTS
            - ANY_OF
          description: Tier requirement type.
        any_of:
          type: array
          minItems: 1
          description: >-
            Lists tier combinations that qualify. Present when `type` is
            `ANY_OF`.
          items:
            $ref: '#/components/schemas/RewardCostTierRulesAnyOfEntryResponse'
      required:
        - type
      additionalProperties: false
      allOf:
        - if:
            properties:
              type:
                const: ANY_OF
          then:
            required:
              - any_of
    RewardPurchaseLimitsCooldown:
      type: object
      description: Purchase cooldown limits for a reward.
      properties:
        type:
          type: string
          enum:
            - NO_COOLDOWN
            - FIXED_COOLDOWN
          description: >-
            Cooldown type. `NO_COOLDOWN` - no cooldown. `FIXED_COOLDOWN` - wait
            a fixed period after each purchase.
        fixed_cooldown:
          $ref: '#/components/schemas/RewardPurchaseLimitsCooldownFixedCooldown'
          description: >-
            Fixed cooldown details. Present when `type` is `FIXED_COOLDOWN`.
            Omitted when `type` is `NO_COOLDOWN`.
      required:
        - type
    RewardPurchaseLimitsFrequency:
      type: object
      description: Purchase frequency limits for a reward.
      properties:
        type:
          type: string
          enum:
            - NO_LIMIT
            - LIMITED
          description: >-
            Frequency limit type. `NO_LIMIT` - unlimited purchases. `LIMITED` -
            limited by the `limits` array.
        limits:
          type: array
          description: >-
            Frequency limit definitions. Empty array when `type` is `NO_LIMIT`;
            one entry when `type` is `LIMITED`.
          items:
            $ref: '#/components/schemas/RewardPurchaseLimitsFrequencyLimit'
      required:
        - type
        - limits
    RewardCostRuleDefinitionResponse:
      type: object
      description: >-
        A single rule definition. `conditions`, `rules` and `error` are omitted
        when not set.
      properties:
        name:
          type: string
          enum:
            - customer.segment
            - customer.metadata
            - member.metadata
          description: Rule kind.
        property:
          type:
            - string
            - 'null'
          description: Metadata property name the rule applies to (for metadata rules).
        conditions:
          type: object
          description: >-
            Operator conditions for the rule (keys are operators such as `$is`,
            `$in`; values are arrays of condition values). Omitted when not set.
        rules:
          $ref: '#/components/schemas/RewardCostRuleGroupResponse'
          description: Nested rules group. Omitted when not set.
        error:
          type: object
          description: >-
            Custom rule error definition with a `message` property. Omitted when
            not set.
          properties:
            message:
              type: string
              description: Error message returned when the rule is not satisfied.
    RewardCostTierRulesAnyOfEntryResponse:
      type: object
      description: Tier structure with the tiers that qualify for this cost.
      properties:
        tier_structure_id:
          type: string
          pattern: ^lts_[a-f0-9]+$
          description: Identifies the tier structure.
        tier_ids:
          type: array
          minItems: 1
          description: Lists the qualifying tier IDs.
          items:
            type: string
            pattern: ^lt_[a-f0-9]+$
      required:
        - tier_structure_id
        - tier_ids
      additionalProperties: false
    RewardPurchaseLimitsCooldownFixedCooldown:
      type: object
      description: Fixed cooldown configuration.
      properties:
        period:
          $ref: >-
            #/components/schemas/LoyaltyV2ActivityRewardPurchaseLimitsCooldownFixedCooldownPeriod
          description: Cooldown period.
      required:
        - period
    RewardPurchaseLimitsFrequencyLimit:
      type: object
      description: A frequency limit. Currently only `TIME_BASED` is supported.
      properties:
        type:
          type: string
          const: TIME_BASED
          description: Limit type. Always `TIME_BASED`.
        period:
          $ref: >-
            #/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod
          description: >-
            Time period that resets the purchase counter. Reuses the
            card-definition time-based period shape.
        triggers:
          $ref: >-
            #/components/schemas/LoyaltyV2ActivityRewardPurchaseLimitsFrequencyLimitTriggers
          description: Purchase count limit within the period.
      required:
        - type
        - period
        - triggers
    LoyaltyV2ActivityRewardPurchaseLimitsCooldownFixedCooldownPeriod:
      type: object
      description: Fixed cooldown period after a reward purchase.
      properties:
        value:
          type: integer
          description: Length of the cooldown period.
          minimum: 1
        unit:
          type: string
          enum:
            - HOUR
            - DAY
            - WEEK
            - MONTH
            - YEAR
          description: Unit of the cooldown period.
      required:
        - value
        - unit
    LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod:
      type: object
      description: Time-based limit period.
      properties:
        type:
          type: string
          enum:
            - CURRENT_PERIOD
          description: Period type.
        current_period:
          type: object
          description: >-
            Current-period configuration. Present when `type` is
            `CURRENT_PERIOD`.
          properties:
            unit:
              type: string
              enum:
                - DAY
                - WEEK
                - MONTH
                - QUARTER
                - YEAR
              description: Calendar period unit.
          required:
            - unit
      required:
        - type
    LoyaltyV2ActivityRewardPurchaseLimitsFrequencyLimitTriggers:
      type: object
      description: Maximum number of purchases allowed in the period.
      properties:
        max:
          type: integer
          minimum: 1
          description: Maximum number of purchases in the configured period.
      required:
        - max
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.