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

# List Card Definitions

> 
<Warning>

<Badge color="yellow">BETA endpoint</Badge>

This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may be subject to change. If you want to share feedback or improvements, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Warning>

Returns a cursor-paginated list of card definitions.

Filtering is supported through the `filters` deep-object query parameter,
e.g. `filters[name][conditions][$is]=Standard%20Card`.
The same field cannot be requested in both ascending and descending
order at the same time.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/card-definitions
openapi: 3.1.0
info:
  title: Voucherify Loyalty v2 API
  version: 2.0.0
  description: >-
    Complete OpenAPI specification for the Voucherify Loyalty v2 API.

    All endpoints require the LOYALTY_V2 feature flag.


    Combined from per-domain specs: programs.yaml, members.yaml,
    program-operations.yaml, card-definitions.yaml, earning-rules.yaml,
    tier-structures.yaml, benefits.yaml, rewards.yaml, examine.yaml
servers:
  - url: '{protocol}://{host}'
    variables:
      protocol:
        default: https
        enum:
          - https
          - http
      host:
        default: api.voucherify.io
security:
  - X-App-Id: []
    X-App-Token: []
  - bearerAuth: []
tags:
  - name: Programs
    description: >-
      Loyalty program CRUD, lifecycle management, program-scoped resource
      assignments (card definitions, earning rules, rewards, tier structures),
      member management (create, list, get, activate, deactivate, delete),
      membership retrieval (member + program + cards with tier progress, by
      customer ID, customer source ID, or member ID), card operations (points
      adjustment, pending points, expiring points, transactions), reward
      purchases, and activity history.
  - name: Card Definitions
    description: >-
      CRUD operations, lifecycle management, and activity history for card
      definitions. Card definitions describe the configuration for loyalty
      cards, including code generation, points expiration, earning/spending
      limits, pending points, refunds, and balance settings.
  - name: Earning Rules
    description: >-
      Manage earning rules that define how customers earn points or receive
      incentives based on triggers (events, segments, custom events). Includes
      CRUD, lifecycle, and activity history.
  - name: Tier Structures
    description: >-
      CRUD operations, lifecycle management, and activity history for tier
      structures. Includes nested tier definitions (create, list, update,
      delete) within tier structures. Tier structures define the tiering model
      for loyalty programs — how members qualify for and move between tiers.
  - name: Benefits
    description: >-
      Manage benefit definitions (fixed points, proportional points, material,
      digital). Includes CRUD, lifecycle transitions, and activity history.
  - name: Rewards
    description: >-
      CRUD, lifecycle operations, and activity history for reward definitions.
      Rewards can be material (product/SKU) or digital (discount coupons, gift
      vouchers).
  - name: Examine
    description: >-
      Evaluation endpoints that estimate earning opportunities and reward
      availability for a customer across their loyalty program memberships,
      without side effects.
paths:
  /v2/loyalties/card-definitions:
    get:
      tags:
        - Card Definitions
      summary: List Card Definitions
      description: >-

        <Warning>


        <Badge color="yellow">BETA endpoint</Badge>


        This is a work-in-progress documentation of a BETA endpoint. The
        parameters, fields, request and response bodies, and other data may be
        subject to change. If you want to share feedback or improvements,
        contact [Voucherify support](https://www.voucherify.io/contact-support)
        or your Technical Account Manager.


        </Warning>


        Returns a cursor-paginated list of card definitions.


        Filtering is supported through the `filters` deep-object query
        parameter,

        e.g. `filters[name][conditions][$is]=Standard%20Card`.

        The same field cannot be requested in both ascending and descending

        order at the same time.
      operationId: listCardDefinitions
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of card definitions to return. Minimum: 1, maximum:
            100. Defaults to 10 when omitted.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: order
          in: query
          required: false
          description: >-
            Sort order. A single field or an array of fields. Prefix a field
            with `-` for

            descending order. Defaults to `-created_at`. The same field cannot
            be used in

            both ascending and descending direction at the same time.
          schema:
            oneOf:
              - type: string
                enum:
                  - '-name'
                  - name
                  - '-type'
                  - type
                  - '-status'
                  - status
                  - '-created_at'
                  - created_at
              - type: array
                items:
                  type: string
                  enum:
                    - '-name'
                    - name
                    - '-type'
                    - type
                    - '-status'
                    - status
                    - '-created_at'
                    - created_at
        - name: cursor
          in: query
          required: false
          description: >-
            Pagination cursor returned by a previous call in `cursor.next`.
            Pattern: `^lcrscdef_[a-f0-9]+$`.
          schema:
            type: string
            pattern: ^lcrscdef_[a-f0-9]+$
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Filter conditions per field, e.g.
            `filters[status][conditions][$is]=ACTIVE`.
          schema:
            $ref: '#/components/schemas/CardDefinitionListFilters'
      responses:
        '200':
          description: A paginated list of card definitions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardDefinitionListResponse'
        '400':
          description: Validation error - the request body or query parameters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict - invalid state transition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CardDefinitionListFilters:
      type: object
      description: >-
        Filters for the card definitions list endpoint. Each field accepts a

        `conditions` object; provided conditions must be valid for the field
        type.
      properties:
        junction:
          type:
            - string
            - 'null'
          enum:
            - AND
            - OR
            - null
          description: Logical junction between field filters. Defaults to `AND`.
        id:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionIdFilter'
            - type: 'null'
          description: Filter by card definition ID.
        name:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionStringFilter'
            - type: 'null'
          description: Filter by card definition name.
        type:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionTypeFilter'
            - type: 'null'
          description: Filter by card definition type.
        status:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionStatusFilter'
            - type: 'null'
          description: Filter by card definition status (`ACTIVE` or `DRAFT` only).
        created_at:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionDateFilter'
            - type: 'null'
          description: Filter by creation date.
        updated_at:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionDateFilter'
            - type: 'null'
          description: Filter by last update date.
      additionalProperties: false
    CardDefinitionListResponse:
      type: object
      description: Cursor-paginated list of card definitions.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinition'
          description: The card definitions in the current page.
        cursor:
          oneOf:
            - $ref: '#/components/schemas/CardDefinitionListCursor'
            - type: 'null'
          description: Pagination cursor. Null when there are no more results.
        object:
          type: string
          const: list
          description: Object type marker. Always `list`.
      required:
        - data
        - cursor
        - object
    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.
    CardDefinitionIdFilter:
      type: object
      description: >-
        ID field filter. Allowed conditions:

        `$is`, `$is_not`, `$in`, `$not_in`. Values must match the card
        definition ID pattern

        `^lcdef_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or
        1-element array);

        `$in`/`$not_in` accept 1-100 values.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
              description: ID equals the given value.
            $is_not:
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
              description: ID does not equal the given value.
            $in:
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
              description: ID is one of the given values (up to 100).
            $not_in:
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
              description: ID is none of the given values (up to 100).
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    CardDefinitionStringFilter:
      type: object
      description: >-
        String field filter. Allowed conditions: `$is`, `$is_not`, `$contains`,
        `$not_contain`,

        `$starts_with`, `$ends_with`, `$in`, `$not_in`, `$has_value`,
        `$is_unknown`.

        Single-value conditions accept a string or a 1-element array;
        `$in`/`$not_in`

        accept 1-10 values; `$has_value`/`$is_unknown` are presence checks and
        ignore the value.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value equals the given string.
            $is_not:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value does not equal the given string.
            $contains:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value contains the given substring.
            $not_contain:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value does not contain the given substring.
            $starts_with:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value starts with the given prefix.
            $ends_with:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Value ends with the given suffix.
            $in:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10
              description: Value is one of the given strings (up to 10).
            $not_in:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10
              description: Value is none of the given strings (up to 10).
            $has_value:
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
              description: >-
                Field has a value (presence check; the provided value is
                ignored).
            $is_unknown:
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
              description: >-
                Field has no value (presence check; the provided value is
                ignored).
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    CardDefinitionTypeFilter:
      type: object
      description: >-
        Enum field filter for the card definition `type` field. Allowed
        conditions:

        `$is`, `$is_not`, `$in`, `$not_in`.

        Values must be one of: `INDIVIDUAL`.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              oneOf:
                - type: string
                  enum:
                    - INDIVIDUAL
                - type: array
                  items:
                    type: string
                    enum:
                      - INDIVIDUAL
                  minItems: 1
                  maxItems: 1
              description: Type equals the given value.
            $is_not:
              oneOf:
                - type: string
                  enum:
                    - INDIVIDUAL
                - type: array
                  items:
                    type: string
                    enum:
                      - INDIVIDUAL
                  minItems: 1
                  maxItems: 1
              description: Type does not equal the given value.
            $in:
              oneOf:
                - type: string
                  enum:
                    - INDIVIDUAL
                - type: array
                  items:
                    type: string
                    enum:
                      - INDIVIDUAL
                  minItems: 1
                  maxItems: 10
              description: Type is one of the given values (up to 10).
            $not_in:
              oneOf:
                - type: string
                  enum:
                    - INDIVIDUAL
                - type: array
                  items:
                    type: string
                    enum:
                      - INDIVIDUAL
                  minItems: 1
                  maxItems: 10
              description: Type is none of the given values (up to 10).
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    CardDefinitionStatusFilter:
      type: object
      description: >-
        Enum field filter for the card definition `status` field. Allowed
        conditions:

        `$is`, `$is_not`, `$in`, `$not_in`.

        Values must be one of: `ACTIVE`, `DRAFT` (deleted card definitions are
        not listable).
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              oneOf:
                - type: string
                  enum:
                    - ACTIVE
                    - DRAFT
                - type: array
                  items:
                    type: string
                    enum:
                      - ACTIVE
                      - DRAFT
                  minItems: 1
                  maxItems: 1
              description: Status equals the given value.
            $is_not:
              oneOf:
                - type: string
                  enum:
                    - ACTIVE
                    - DRAFT
                - type: array
                  items:
                    type: string
                    enum:
                      - ACTIVE
                      - DRAFT
                  minItems: 1
                  maxItems: 1
              description: Status does not equal the given value.
            $in:
              oneOf:
                - type: string
                  enum:
                    - ACTIVE
                    - DRAFT
                - type: array
                  items:
                    type: string
                    enum:
                      - ACTIVE
                      - DRAFT
                  minItems: 1
                  maxItems: 10
              description: Status is one of the given values (up to 10).
            $not_in:
              oneOf:
                - type: string
                  enum:
                    - ACTIVE
                    - DRAFT
                - type: array
                  items:
                    type: string
                    enum:
                      - ACTIVE
                      - DRAFT
                  minItems: 1
                  maxItems: 10
              description: Status is none of the given values (up to 10).
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    CardDefinitionDateFilter:
      type: object
      description: >-
        Date field filter. Allowed conditions:

        `$before`, `$after`, `$is`, `$more_than`, `$less_than`, `$has_value`,
        `$is_unknown`.

        `$before`/`$after` accept a date string; `$is`/`$more_than`/`$less_than`
        accept a

        non-negative integer (number of days); `$has_value`/`$is_unknown` are
        presence checks.

        Single values may be passed as a string or a 1-element array.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $before:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Date is before the given date (a date string).
            $after:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: Date is after the given date (a date string).
            $is:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: >-
                Date matches the given value expressed as a non-negative integer
                number of days.
            $more_than:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: >-
                Date is more than the given non-negative integer number of days
                ago.
            $less_than:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
              description: >-
                Date is less than the given non-negative integer number of days
                ago.
            $has_value:
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
              description: >-
                Field has a value (presence check; the provided value is
                ignored).
            $is_unknown:
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
              description: >-
                Field has no value (presence check; the provided value is
                ignored).
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    CardDefinition:
      type: object
      description: A card definition.
      properties:
        id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: Unique card definition ID.
        name:
          type: string
          description: Card definition name.
        type:
          type: string
          enum:
            - INDIVIDUAL
          description: Card definition type.
        status:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - DELETED
          description: Current card definition status.
        code_config:
          $ref: '#/components/schemas/CardDefinitionCodeConfig'
        points_expiration:
          $ref: '#/components/schemas/CardDefinitionPointsExpiration'
        pending_points:
          $ref: '#/components/schemas/CardDefinitionPendingPoints'
        earning_limits:
          $ref: '#/components/schemas/CardDefinitionEarningLimits'
        spending_limits:
          $ref: '#/components/schemas/CardDefinitionSpendingLimits'
        refunds:
          $ref: '#/components/schemas/CardDefinitionRefunds'
        balance_settings:
          $ref: '#/components/schemas/CardDefinitionBalanceSettings'
        pay_with_points:
          $ref: '#/components/schemas/CardDefinitionPayWithPoints'
        metadata:
          type: object
          description: Arbitrary key-value metadata. Empty object when not set.
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601).
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Last update timestamp (ISO 8601). Null when the card definition has
            never been updated.
        object:
          type: string
          const: card_definition
          description: Object type marker. Always `card_definition`.
      required:
        - id
        - name
        - type
        - status
        - code_config
        - points_expiration
        - pending_points
        - earning_limits
        - spending_limits
        - refunds
        - balance_settings
        - pay_with_points
        - metadata
        - created_at
        - updated_at
        - object
    CardDefinitionListCursor:
      type: object
      description: Pagination cursor.
      properties:
        next:
          type: string
          pattern: ^lcrscdef_[a-f0-9]+$
          description: >-
            Cursor ID to pass as the `cursor` query parameter to fetch the next
            page.
        expires_at:
          type: string
          format: date-time
          description: Timestamp after which the cursor expires.
      required:
        - next
    CardDefinitionCodeConfig:
      type: object
      description: >-
        Card code generation configuration. Always present with server-side
        defaults applied.
      properties:
        pattern:
          type: string
          description: >-
            Code pattern where each `#` is replaced with a random character from
            the charset.
        length:
          type: integer
          description: Number of `#` placeholders in the pattern.
        charset:
          type: string
          description: Characters used for code generation.
        prefix:
          type: string
          description: >-
            Fixed prefix prepended to every generated code. Empty string when
            not set.
        postfix:
          type: string
          description: >-
            Fixed postfix appended to every generated code. Empty string when
            not set.
      required:
        - pattern
        - length
        - charset
        - prefix
        - postfix
    CardDefinitionPointsExpiration:
      type: object
      description: Points expiration policy. Always present; defaults to `NO_EXPIRATION`.
      properties:
        type:
          type: string
          enum:
            - NO_EXPIRATION
            - ROLLING_EXPIRATION
            - CALENDAR_EXPIRATION
            - SLIDING_EXPIRATION
          description: Points expiration type.
        rolling_expiration:
          $ref: '#/components/schemas/CardDefinitionPointsExpirationRollingExpiration'
          description: >-
            Rolling expiration configuration. Only present when `type` is
            `ROLLING_EXPIRATION`.
        calendar_expiration:
          $ref: >-
            #/components/schemas/CardDefinitionPointsExpirationCalendarExpiration
          description: >-
            Calendar expiration configuration. Only present when `type` is
            `CALENDAR_EXPIRATION`.
        sliding_expiration:
          $ref: '#/components/schemas/CardDefinitionPointsExpirationSlidingExpiration'
          description: >-
            Sliding expiration configuration. Only present when `type` is
            `SLIDING_EXPIRATION`.
      required:
        - type
    CardDefinitionPendingPoints:
      type: object
      description: >-
        Pending points activation policy. Always present; defaults to
        `IMMEDIATE`.
      properties:
        type:
          type: string
          enum:
            - IMMEDIATE
            - PERIOD_BASED
            - FIXED_DATES
            - EVENT_BASED
          description: Pending points activation type.
        period_based:
          $ref: '#/components/schemas/CardDefinitionPendingPointsPeriodBased'
          description: Period-based activation. Only present when `type` is `PERIOD_BASED`.
        fixed_dates:
          $ref: '#/components/schemas/CardDefinitionPendingPointsFixedDates'
          description: Fixed-dates activation. Only present when `type` is `FIXED_DATES`.
        event_based:
          $ref: '#/components/schemas/CardDefinitionPendingPointsEventBased'
          description: Event-based activation. Only present when `type` is `EVENT_BASED`.
      required:
        - type
    CardDefinitionEarningLimits:
      type: object
      description: >-
        Points earning limits. Always present; defaults to `NO_LIMIT` for both
        scopes.
      properties:
        global:
          $ref: '#/components/schemas/CardDefinitionEarningLimitsGlobal'
        transactions:
          $ref: '#/components/schemas/CardDefinitionEarningLimitsTransactions'
    CardDefinitionSpendingLimits:
      type: object
      description: >-
        Points spending limits. Always present; defaults to `NO_LIMIT` for both
        scopes.
      properties:
        global:
          $ref: '#/components/schemas/CardDefinitionSpendingLimitsGlobal'
        transactions:
          $ref: '#/components/schemas/CardDefinitionSpendingLimitsTransactions'
    CardDefinitionRefunds:
      type: object
      description: >-
        Refund handling configuration. Always present; defaults to `NONE` for
        both scopes.
      properties:
        spent_points:
          $ref: '#/components/schemas/CardDefinitionRefundsSpentPoints'
        earned_points:
          $ref: '#/components/schemas/CardDefinitionRefundsEarnedPoints'
      required:
        - spent_points
        - earned_points
    CardDefinitionBalanceSettings:
      type: object
      description: >-
        Card balance settings. Always present; defaults to `allow_negative:
        false`.
      properties:
        allow_negative:
          type: boolean
          description: Whether the card balance is allowed to go below zero.
      required:
        - allow_negative
    CardDefinitionPayWithPoints:
      type: object
      description: >-
        Pay-with-points configuration. Always present; defaults to
        `NO_PAYMENTS`.
      properties:
        type:
          type: string
          enum:
            - NO_PAYMENTS
            - EXCHANGE_RATIO
          description: Pay-with-points type.
        exchange_ratio:
          type: object
          description: Exchange ratio. Only present when `type` is `EXCHANGE_RATIO`.
          properties:
            formula:
              type: string
              description: Exchange ratio formula (always returned as a string).
          required:
            - formula
      required:
        - type
    CardDefinitionPointsExpirationRollingExpiration:
      type: object
      description: Rolling expiration configuration.
      properties:
        period:
          $ref: '#/components/schemas/CardDefinitionPeriod'
          description: Rolling expiration period. Unit is one of `DAY`, `MONTH`, `YEAR`.
        rounding:
          oneOf:
            - $ref: >-
                #/components/schemas/CardDefinitionPointsExpirationRollingExpirationRounding
            - type: 'null'
          description: >-
            Rounding applied to the calculated expiration date. Null when not
            configured.
      required:
        - period
    CardDefinitionPointsExpirationCalendarExpiration:
      type: object
      description: Calendar expiration configuration.
      properties:
        expiration_dates:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionCalendarDate'
          description: Calendar dates on which points expire.
      required:
        - expiration_dates
    CardDefinitionPointsExpirationSlidingExpiration:
      type: object
      description: Sliding expiration configuration.
      properties:
        earning_activity:
          type: boolean
          description: Whether earning points resets the expiration window.
        spending_activity:
          type: boolean
          description: Whether spending points resets the expiration window.
        custom_activity:
          type: boolean
          description: Whether the configured custom events reset the expiration window.
        custom_activity_types:
          type: array
          items:
            type: string
          description: >-
            Custom event schema IDs that reset the expiration window. Empty
            array when `custom_activity` is false.
        period:
          $ref: '#/components/schemas/CardDefinitionPeriod'
          description: Sliding expiration period. Unit is one of `DAY`, `MONTH`, `YEAR`.
      required:
        - custom_activity_types
        - period
    CardDefinitionPendingPointsPeriodBased:
      type: object
      description: Period-based pending points activation.
      properties:
        period:
          $ref: '#/components/schemas/CardDefinitionPeriod'
          description: Pending period. Unit is one of `DAY`, `MONTH`, `YEAR`.
      required:
        - period
    CardDefinitionPendingPointsFixedDates:
      type: object
      description: Fixed-dates pending points activation.
      properties:
        dates:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionCalendarDate'
          description: Calendar dates on which pending points activate.
      required:
        - dates
    CardDefinitionPendingPointsEventBased:
      type: object
      description: Event-based pending points activation.
      properties:
        event_types:
          type: array
          items:
            type: string
          description: Custom event schema IDs that activate pending points.
        cancel_period:
          $ref: '#/components/schemas/CardDefinitionPeriod'
          description: >-
            Period after which non-activated pending points are cancelled. Unit
            is one of `DAY`, `MONTH`, `YEAR`.
      required:
        - event_types
        - cancel_period
    CardDefinitionEarningLimitsGlobal:
      type: object
      description: Global (per card) earning limits.
      properties:
        type:
          type: string
          enum:
            - NO_LIMIT
            - LIMITED
          description: Whether global earning limits apply.
        limits:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionEarningLimitsGlobalLimit'
          description: Limit definitions. Empty array when `type` is `NO_LIMIT`.
      required:
        - type
        - limits
    CardDefinitionEarningLimitsTransactions:
      type: object
      description: Per-transaction earning limits.
      properties:
        type:
          type: string
          enum:
            - NO_LIMIT
            - LIMITED
          description: Whether per-transaction earning limits apply.
        limits:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionEarningLimitsTransactionsLimit'
          description: Limit definitions. Empty array when `type` is `NO_LIMIT`.
      required:
        - type
        - limits
    CardDefinitionSpendingLimitsGlobal:
      type: object
      description: Global (per card) spending limits.
      properties:
        type:
          type: string
          enum:
            - NO_LIMIT
            - LIMITED
          description: Whether global spending limits apply.
        limits:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionSpendingLimitsGlobalLimit'
          description: Limit definitions. Empty array when `type` is `NO_LIMIT`.
      required:
        - type
        - limits
    CardDefinitionSpendingLimitsTransactions:
      type: object
      description: Per-transaction spending limits.
      properties:
        type:
          type: string
          enum:
            - NO_LIMIT
            - LIMITED
          description: Whether per-transaction spending limits apply.
        limits:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionSpendingLimitsTransactionsLimit'
          description: Limit definitions. Empty array when `type` is `NO_LIMIT`.
      required:
        - type
        - limits
    CardDefinitionRefundsSpentPoints:
      type: object
      description: How points spent on a refunded order are handled.
      properties:
        type:
          type: string
          enum:
            - NONE
            - REFUNDABLE
          description: Whether spent points are refundable.
        methods:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionRefundsSpentPointsMethod'
          description: Refund methods. Empty array when `type` is `NONE`.
      required:
        - type
        - methods
    CardDefinitionRefundsEarnedPoints:
      type: object
      description: How points earned on a refunded order are handled.
      properties:
        type:
          type: string
          enum:
            - NONE
            - REFUNDABLE
          description: Whether earned points are revocable on refund.
        methods:
          type: array
          items:
            $ref: '#/components/schemas/CardDefinitionRefundsEarnedPointsMethod'
          description: Revoke methods. Empty array when `type` is `NONE`.
      required:
        - type
        - methods
    CardDefinitionPeriod:
      type: object
      description: A period expressed as a value and unit.
      properties:
        value:
          type: integer
          description: Period length.
        unit:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          description: Period unit.
      required:
        - value
        - unit
    CardDefinitionPointsExpirationRollingExpirationRounding:
      type: object
      description: Rounding of the rolling expiration date.
      properties:
        type:
          type: string
          enum:
            - END_OF_MONTH
            - END_OF_QUARTER
            - END_OF_HALF_YEAR
            - END_OF_YEAR
            - END_OF_PARTICULAR_MONTH
          description: Rounding type.
        value:
          type: integer
          minimum: 1
          maximum: 12
          description: >-
            Month number (1-12). Only present when `type` is
            `END_OF_PARTICULAR_MONTH`.
      required:
        - type
    CardDefinitionCalendarDate:
      type: object
      description: A calendar date (day + month).
      properties:
        day:
          type: integer
          minimum: 1
          maximum: 31
          description: Day of the month.
        month:
          type: integer
          minimum: 1
          maximum: 12
          description: Month number (1-12).
      required:
        - day
        - month
    CardDefinitionEarningLimitsGlobalLimit:
      description: 'A global earning limit: `BALANCE_BASED` or `TIME_BASED`.'
      oneOf:
        - type: object
          description: Balance-based limit.
          properties:
            type:
              type: string
              const: BALANCE_BASED
              description: Limit type.
            max:
              type: integer
              description: Maximum card balance in points.
          required:
            - type
            - max
        - type: object
          description: Time-based limit.
          properties:
            type:
              type: string
              const: TIME_BASED
              description: Limit type.
            period:
              $ref: '#/components/schemas/CardDefinitionLimitTimeBasedPeriod'
            points:
              $ref: '#/components/schemas/CardDefinitionLimitTimeBasedPoints'
          required:
            - type
      discriminator:
        propertyName: type
    CardDefinitionEarningLimitsTransactionsLimit:
      description: 'A per-transaction earning limit: `POINTS` or `SPENDING`.'
      oneOf:
        - type: object
          description: Points limit.
          properties:
            type:
              type: string
              const: POINTS
              description: Limit type.
            max:
              type: integer
              description: Maximum points earned per transaction.
          required:
            - type
            - max
        - type: object
          description: Spending threshold.
          properties:
            type:
              type: string
              const: SPENDING
              description: Limit type.
            min_amount:
              type: integer
              description: Minimum transaction amount required to earn points.
          required:
            - type
            - min_amount
      discriminator:
        propertyName: type
    CardDefinitionSpendingLimitsGlobalLimit:
      description: 'A global spending limit: `SPENDING_BASED` or `TIME_BASED`.'
      oneOf:
        - type: object
          description: Spending-based limit.
          properties:
            type:
              type: string
              const: SPENDING_BASED
              description: Limit type.
            max:
              type: integer
              description: Maximum total points spent.
          required:
            - type
            - max
        - type: object
          description: Time-based limit.
          properties:
            type:
              type: string
              const: TIME_BASED
              description: Limit type.
            period:
              $ref: '#/components/schemas/CardDefinitionLimitTimeBasedPeriod'
            points:
              $ref: '#/components/schemas/CardDefinitionLimitTimeBasedPoints'
          required:
            - type
      discriminator:
        propertyName: type
    CardDefinitionSpendingLimitsTransactionsLimit:
      type: object
      description: >-
        A per-transaction spending limit. Currently only the `POINTS` type
        exists.
      properties:
        type:
          type: string
          const: POINTS
          description: Limit type.
        max:
          type: integer
          description: Maximum points spent per transaction.
      required:
        - type
        - max
    CardDefinitionRefundsSpentPointsMethod:
      type: object
      description: A spent points refund method.
      properties:
        type:
          type: string
          const: RETURN_POINTS
          description: Refund method type.
        mode:
          type: string
          enum:
            - REFUND_ALL
            - REFUND_ITEM
            - REFUND_AMOUNT
          description: Refund mode.
      required:
        - type
        - mode
    CardDefinitionRefundsEarnedPointsMethod:
      description: >-
        An earned points revoke method: `REVOKE_FROM_PENDING` or
        `REVOKE_FROM_BALANCE`.
      oneOf:
        - type: object
          description: Revoke earned points from pending points.
          properties:
            type:
              type: string
              const: REVOKE_FROM_PENDING
              description: Revoke method type.
          required:
            - type
        - type: object
          description: Revoke earned points from the card balance.
          properties:
            type:
              type: string
              const: REVOKE_FROM_BALANCE
              description: Revoke method type.
            mode:
              type: string
              enum:
                - REVOKE_TO_ZERO
                - REVOKE_BELOW_ZERO
              description: Revoke mode.
          required:
            - type
            - mode
      discriminator:
        propertyName: type
    CardDefinitionLimitTimeBasedPeriod:
      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
    CardDefinitionLimitTimeBasedPoints:
      type: object
      description: Points cap for a time-based limit.
      properties:
        max:
          type: integer
          description: Maximum points within the 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

````