> ## 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 program member activities

> Returns a cursor-paginated list of lifecycle and card-assignment activities recorded for the member. Results can be filtered by `id`, `type`, or `created_at`.

Returns `400` when the provided cursor is invalid or has expired. Returns `404` when the program or member does not exist.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/programs/{programId}/members/{memberId}/activities
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, update, 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/programs/{programId}/members/{memberId}/activities:
    parameters:
      - name: programId
        in: path
        required: true
        description: Unique loyalty program ID (format `lprg_[a-f0-9]+`).
        schema:
          type: string
          pattern: ^lprg_[a-f0-9]+$
      - name: memberId
        in: path
        required: true
        description: Program member ID (format `lmbr_[a-f0-9]+`).
        schema:
          type: string
          pattern: ^lmbr_[a-f0-9]+$
    get:
      tags:
        - Programs
      summary: List program member activities
      description: >-
        Returns a cursor-paginated list of lifecycle and card-assignment
        activities recorded for the member. Results can be filtered by `id`,
        `type`, or `created_at`.


        Returns `400` when the provided cursor is invalid or has expired.
        Returns `404` when the program or member does not exist.
      operationId: listProgramMemberActivities
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of activities to return. Must be between 1 and 100.
            Defaults to 10 when not provided.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
            maximum: 100
            default: 10
        - name: order
          in: query
          required: false
          description: >-
            Field(s) to order results by. Valid orders are `created_at` and
            `-created_at`; defaults to `-created_at`. Accepts a single value or
            an array of values (unrecognized values in the array form are
            ignored and the default order applies). Ordering by the same field
            in both directions simultaneously is rejected.
          schema:
            oneOf:
              - type: array
                items:
                  type: string
              - type: string
                enum:
                  - created_at
                  - '-created_at'
              - type: 'null'
        - name: cursor
          in: query
          required: false
          description: >-
            Pagination cursor returned in the `cursor.next` field of a previous
            response. Must match the pattern `^lcrsambr_[a-f0-9]+$`.
          schema:
            type:
              - string
              - 'null'
            pattern: ^lcrsambr_[a-f0-9]+$
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Field-specific filter conditions, passed as a deep object, e.g.
            `filters[type][conditions][$is]=vl.member.created`.
          schema:
            oneOf:
              - $ref: >-
                  #/components/schemas/LoyaltiesProgramsMembersActivitiesListRequestQueryFilters
              - type: 'null'
      responses:
        '200':
          description: Cursor-paginated list of member activities.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoyaltiesProgramsMembersActivitiesListResponseBody
              examples:
                List of member activities:
                  value:
                    data:
                      - id: lambr_130da710ecee46e2a6
                        type: vl.member.updated
                        data:
                          member:
                            id: lmbr_128f962dbc8c4ba5dc
                            object: member
                            status: ACTIVE
                            metadata:
                              Lv2Member: true
                            created_at: '2026-06-11T15:59:41.298Z'
                            program_id: lprg_128f58429f4c4bf7b2
                            updated_at: '2026-09-17T14:02:05.105Z'
                            customer_id: cust_6onRrs4kCnvSVrTs5YtDPFBG
                          program:
                            id: lprg_128f58429f4c4bf7b2
                            name: AnnualProgram
                            object: program
                            status: ACTIVE
                            end_date: null
                            metadata: {}
                            created_at: '2026-06-11T11:29:09.756Z'
                            start_date: null
                            updated_at: '2026-07-22T19:09:54.323Z'
                            validity_hours:
                              type: ANY_TIME
                        created_at: '2026-09-17T14:02:05.105Z'
                        group_id: v-130da710e305963b5f
                        source:
                          channel: USER_PORTAL
                          user:
                            id: user_...(example user ID)
                        member_id: lmbr_128f962dbc8c4ba5dc
                      - id: lambr_12fa8445996a9fd12f
                        type: vl.member.activated
                        data:
                          member:
                            id: lmbr_128f962dbc8c4ba5dc
                            object: member
                            status: ACTIVE
                            metadata: {}
                            created_at: '2026-06-11T15:59:41.298Z'
                            program_id: lprg_128f58429f4c4bf7b2
                            updated_at: '2026-09-02T17:18:55.570Z'
                            customer_id: cust_6onRrs4kCnvSVrTs5YtDPFBG
                          program:
                            id: lprg_128f58429f4c4bf7b2
                            name: AnnualProgram
                            object: program
                            status: ACTIVE
                            end_date: null
                            metadata: {}
                            created_at: '2026-06-11T11:29:09.756Z'
                            start_date: null
                            updated_at: '2026-07-22T19:09:54.323Z'
                            validity_hours:
                              type: ANY_TIME
                        created_at: '2026-09-02T17:18:55.589Z'
                        group_id: v-12fa8445926406744d
                        source:
                          channel: API
                          api_key:
                            name: Primary
                            app_id: some-app-id
                        member_id: lmbr_128f962dbc8c4ba5dc
                      - id: lambr_128f962dc00c4ba5f5
                        type: vl.member.card.assigned
                        data:
                          card:
                            id: lcrd_128f962dbd8c4ba5e1
                            code: null
                            object: card
                            balance:
                              points: 0
                              pending_points: 0
                            card_type: INDIVIDUAL
                            member_id: lmbr_128f962dbc8c4ba5dc
                            created_at: '2026-06-11T15:59:41.302Z'
                            program_id: lprg_128f58429f4c4bf7b2
                            updated_at: null
                            customer_id: cust_6onRrs4kCnvSVrTs5YtDPFBG
                            lifetime_bucket:
                              points:
                                added: 0
                                spent: 0
                                total: 0
                                earned: 0
                                locked: 0
                                expired: 0
                                refunded: 0
                                returned: 0
                                unlocked: 0
                                subtracted: 0
                                purchased: 0
                                purchased_reversed: 0
                              pending_points:
                                total: 0
                                canceled: 0
                                activated: 0
                            card_definition_id: lcdef_128f4a88414c4bed69
                          member:
                            id: lmbr_128f962dbc8c4ba5dc
                            object: member
                            status: ACTIVE
                            metadata: {}
                            created_at: '2026-06-11T15:59:41.298Z'
                            program_id: lprg_128f58429f4c4bf7b2
                            updated_at: null
                            customer_id: cust_6onRrs4kCnvSVrTs5YtDPFBG
                          program:
                            id: lprg_128f58429f4c4bf7b2
                            name: AnnualProgram
                            object: program
                            status: ACTIVE
                            end_date: null
                            metadata: {}
                            created_at: '2026-06-11T11:29:09.756Z'
                            start_date: null
                            updated_at: '2026-06-11T15:58:23.525Z'
                            validity_hours:
                              type: ANY_TIME
                          member_card:
                            card:
                              id: lcrd_128f962dbd8c4ba5e1
                              code: null
                              object: card
                              balance:
                                points: 0
                                pending_points: 0
                              card_type: INDIVIDUAL
                              lifetime_bucket:
                                points:
                                  added: 0
                                  spent: 0
                                  total: 0
                                  earned: 0
                                  locked: 0
                                  expired: 0
                                  refunded: 0
                                  returned: 0
                                  unlocked: 0
                                  subtracted: 0
                                  purchased: 0
                                  purchased_reversed: 0
                                pending_points:
                                  total: 0
                                  canceled: 0
                                  activated: 0
                              next_activation: null
                              next_expiration: null
                              card_definition_id: lcdef_128f4a88414c4bed69
                            object: member_card
                            created_at: '2026-06-11T15:59:41.303Z'
                            member_role: OWNER
                            tier_progress: null
                        created_at: '2026-06-11T15:59:41.303Z'
                        group_id: v-128f962db19cae026c
                        source:
                          channel: USER_PORTAL
                          user:
                            id: user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7
                        member_id: lmbr_128f962dbc8c4ba5dc
                      - id: lambr_128f962dbd4c4ba5dd
                        type: vl.member.created
                        data:
                          member:
                            id: lmbr_128f962dbc8c4ba5dc
                            object: member
                            status: ACTIVE
                            metadata: {}
                            created_at: '2026-06-11T15:59:41.298Z'
                            program_id: lprg_128f58429f4c4bf7b2
                            updated_at: null
                            customer_id: cust_6onRrs4kCnvSVrTs5YtDPFBG
                          program:
                            id: lprg_128f58429f4c4bf7b2
                            name: AnnualProgram
                            object: program
                            status: ACTIVE
                            end_date: null
                            metadata: {}
                            created_at: '2026-06-11T11:29:09.756Z'
                            start_date: null
                            updated_at: '2026-06-11T15:58:23.525Z'
                            validity_hours:
                              type: ANY_TIME
                        created_at: '2026-06-11T15:59:41.298Z'
                        group_id: v-128f962db19cae026c
                        source:
                          channel: USER_PORTAL
                          user:
                            id: user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7
                        member_id: lmbr_128f962dbc8c4ba5dc
                    cursor:
                      next: lcrsambr_130daa57296e46e6b6
                      expires_at: '2026-09-17T14:26:23.462Z'
                    object: list
        '400':
          description: Query parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Invalid cursor:
                  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-130db36510c5e2759b
        '404':
          description: The program or member was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Program not found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find program with id lprg_18f58429f4c4bf7b2
                    request_id: v-130db30e15859652a6
                    resource_id: lprg_18f58429f4c4bf7b2
                    resource_type: program
                Member not found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find member with id lmbr_128f62dbc8c4ba5dc
                    request_id: v-130db31ffb859652cd
                    resource_id: lmbr_128f62dbc8c4ba5dc
                    resource_type: member
        '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.
components:
  schemas:
    LoyaltiesProgramsMembersActivitiesListRequestQueryFilters:
      type: object
      description: >-
        Field-specific filters for **GET**
        `/v2/loyalties/programs/{programId}/members/{memberId}/activities`.
      properties:
        junction:
          description: How multiple field filters are combined. Defaults to `AND`.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        id:
          description: >-
            Filter by activity ID (ID conditions, values matching
            `^lambr_[a-f0-9]+$`).
          oneOf:
            - $ref: >-
                #/components/schemas/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersId
            - type: 'null'
        type:
          description: >-
            Filter by activity type (enum conditions over the member activity
            types).
          oneOf:
            - $ref: >-
                #/components/schemas/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersType
            - type: 'null'
        created_at:
          description: Filter by activity creation date (date conditions).
          oneOf:
            - $ref: '#/components/schemas/DateFilter'
            - type: 'null'
      additionalProperties: false
      title: Loyalties Programs Members Activities List Request Query Filters
    LoyaltiesProgramsMembersActivitiesListResponseBody:
      title: Loyalties Programs Members Activities List Response Body
      type: object
      description: >-
        Response body schema for **GET**
        `/v2/loyalties/programs/{programId}/members/{memberId}/activities`.
      properties:
        data:
          type: array
          description: Member activities on the current page.
          items:
            $ref: '#/components/schemas/MemberActivity'
        cursor:
          description: Pagination cursor, or `null` when there are no more results.
          oneOf:
            - $ref: '#/components/schemas/ListCursor'
            - type: 'null'
        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.
    LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersId:
      type: object
      description: >-
        ID filter conditions for member activity IDs. At least one condition is
        required.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              description: Value equals. Single value or an array with exactly one value.
              oneOf:
                - type: string
                  pattern: ^lambr_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lambr_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Value does not equal. Single value or an array with exactly one
                value.
              oneOf:
                - type: string
                  pattern: ^lambr_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lambr_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: Value is one of. Single value or an array of 1-100 values.
              oneOf:
                - type: string
                  pattern: ^lambr_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lambr_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: Value is not one of. Single value or an array of 1-100 values.
              oneOf:
                - type: string
                  pattern: ^lambr_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lambr_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersType:
      type: object
      description: >-
        Enum filter conditions for member activity types. At least one condition
        is

        required.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $is:
              description: Value equals. Single value or an array with exactly one value.
              oneOf:
                - type: string
                  enum:
                    - vl.member.created
                    - vl.member.updated
                    - vl.member.deleted
                    - vl.member.activated
                    - vl.member.deactivated
                    - vl.member.card.assigned
                    - vl.member.card.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.member.created
                      - vl.member.updated
                      - vl.member.deleted
                      - vl.member.activated
                      - vl.member.deactivated
                      - vl.member.card.assigned
                      - vl.member.card.unassigned
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Value does not equal. Single value or an array with exactly one
                value.
              oneOf:
                - type: string
                  enum:
                    - vl.member.created
                    - vl.member.updated
                    - vl.member.deleted
                    - vl.member.activated
                    - vl.member.deactivated
                    - vl.member.card.assigned
                    - vl.member.card.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.member.created
                      - vl.member.updated
                      - vl.member.deleted
                      - vl.member.activated
                      - vl.member.deactivated
                      - vl.member.card.assigned
                      - vl.member.card.unassigned
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: Value is one of. Single value or an array of 1-10 values.
              oneOf:
                - type: string
                  enum:
                    - vl.member.created
                    - vl.member.updated
                    - vl.member.deleted
                    - vl.member.activated
                    - vl.member.deactivated
                    - vl.member.card.assigned
                    - vl.member.card.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.member.created
                      - vl.member.updated
                      - vl.member.deleted
                      - vl.member.activated
                      - vl.member.deactivated
                      - vl.member.card.assigned
                      - vl.member.card.unassigned
                  minItems: 1
                  maxItems: 10
                - type: 'null'
            $not_in:
              description: Value is not one of. Single value or an array of 1-10 values.
              oneOf:
                - type: string
                  enum:
                    - vl.member.created
                    - vl.member.updated
                    - vl.member.deleted
                    - vl.member.activated
                    - vl.member.deactivated
                    - vl.member.card.assigned
                    - vl.member.card.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.member.created
                      - vl.member.updated
                      - vl.member.deleted
                      - vl.member.activated
                      - vl.member.deactivated
                      - vl.member.card.assigned
                      - vl.member.card.unassigned
                  minItems: 1
                  maxItems: 10
                - type: 'null'
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    DateFilter:
      type: object
      description: >-
        Date filter conditions. `$before`/`$after` take date strings (ISO 8601);
        `$is`, `$more_than`, `$less_than` take non-negative integers;
        `$has_value`/`$is_unknown` are presence checks. Each condition accepts a
        single value or an array with exactly one value. At least one condition
        is required.
      properties:
        conditions:
          type: object
          minProperties: 1
          properties:
            $before:
              description: Date is before the given date.
              oneOf:
                - type: string
                  format: date-time
                - type: array
                  items:
                    type: string
                    format: date-time
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $after:
              description: Date is after the given date.
              oneOf:
                - type: string
                  format: date-time
                - type: array
                  items:
                    type: string
                    format: date-time
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is:
              description: Date matches the given non-negative integer value.
              oneOf:
                - type: string
                  pattern: ^[0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^[0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $more_than:
              description: More than the given non-negative integer value.
              oneOf:
                - type: string
                  pattern: ^[0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^[0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $less_than:
              description: Less than the given non-negative integer value.
              oneOf:
                - type: string
                  pattern: ^[0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^[0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $has_value:
              description: Field has a value (presence check).
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
            $is_unknown:
              description: Field has no value (absence check).
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    MemberActivity:
      type: object
      description: An activity recorded for a member.
      properties:
        id:
          type: string
          pattern: ^lambr_[a-f0-9]+$
          description: Unique activity ID.
        member_id:
          type: string
          pattern: ^lmbr_[a-f0-9]+$
          description: ID of the member the activity relates to.
        type:
          type: string
          enum:
            - vl.member.created
            - vl.member.updated
            - vl.member.deleted
            - vl.member.activated
            - vl.member.deactivated
            - vl.member.card.assigned
            - vl.member.card.unassigned
          description: >-
            Activity type. Allowed values: `vl.member.created`,
            `vl.member.updated`, `vl.member.deleted`, `vl.member.activated`,
            `vl.member.deactivated`, `vl.member.card.assigned`, and
            `vl.member.card.unassigned`.
        data:
          $ref: '#/components/schemas/MemberActivityData'
          description: >-
            Contains snapshots of the objects involved at the time of the
            activity.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the activity was recorded (ISO 8601).
        group_id:
          type: string
          description: ID grouping activities recorded within the same request.
        source:
          $ref: '#/components/schemas/ActivitySource'
          description: Origin of the activity. Omitted when not available.
      required:
        - id
        - member_id
        - type
        - data
        - created_at
    ListCursor:
      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
        - expires_at
    MemberActivityData:
      type: object
      description: >-
        Snapshots of the objects involved at the time of the activity. Always
        contains `member` and `program`. For `vl.member.card.assigned` and
        `vl.member.card.unassigned`, also contains `card` and `member_card`.
      properties:
        member:
          $ref: '#/components/schemas/Member'
          description: Member snapshot at the time of the activity.
        program:
          $ref: '#/components/schemas/Program'
          description: Program snapshot at the time of the activity.
        card:
          $ref: '#/components/schemas/Card'
          description: >-
            Full card snapshot. Present only for `vl.member.card.assigned` and
            `vl.member.card.unassigned`.
        member_card:
          description: >-
            Member-card assignment snapshot. Present only for
            `vl.member.card.assigned` and `vl.member.card.unassigned`.
          allOf:
            - $ref: '#/components/schemas/MemberCard'
            - type: object
              properties:
                tier_progress:
                  type: 'null'
                  description: >-
                    Always `null` for `vl.member.card.assigned` and
                    `vl.member.card.unassigned`. The snapshot is built from the
                    card assignment record, which does not include tier
                    progress.
              required:
                - tier_progress
      required:
        - member
        - program
      additionalProperties: false
    ActivitySource:
      type: object
      description: Origin of an activity.
      properties:
        channel:
          type: string
          enum:
            - USER_PORTAL
            - API
            - CLIENT_API
            - INTERNAL
          description: Channel through which the activity was triggered.
        user:
          $ref: '#/components/schemas/ActivitySourceUser'
          description: >-
            Dashboard user who triggered the activity. Omitted when not
            applicable.
        api_key:
          $ref: '#/components/schemas/ActivitySourceApiKey'
          description: API key used to trigger the activity. Omitted when not applicable.
      required:
        - channel
      additionalProperties: false
    Member:
      type: object
      description: A loyalty program member.
      properties:
        id:
          type: string
          pattern: ^lmbr_[a-f0-9]+$
          description: Identifies the member.
        customer_id:
          type: string
          pattern: ^cust_[a-zA-Z0-9]+
          description: Identifies the enrolled customer.
        program_id:
          type: string
          pattern: ^lprg_[a-f0-9]+$
          description: Identifies the loyalty program.
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - DELETED
          description: >-
            Current member status. Allowed values: `ACTIVE`, `INACTIVE`,
            `DELETED`. `INACTIVE` members cannot earn points or redeem rewards.
        metadata:
          type: object
          description: Stores custom member metadata. Empty object when none is set.
        created_at:
          type: string
          format: date-time
          description: Records when the member was created (ISO 8601).
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Records the last update (ISO 8601). `null` if the member has never
            been updated.
        object:
          type: string
          const: member
          description: Object type. Always `member`.
      required:
        - id
        - customer_id
        - program_id
        - status
        - metadata
        - created_at
        - updated_at
        - object
    Program:
      type: object
      description: A loyalty program.
      properties:
        id:
          type: string
          description: Unique program identifier.
          pattern: ^lprg_[a-f0-9]+$
        name:
          type: string
          description: Program name.
        status:
          type: string
          description: Program status.
          enum:
            - DRAFT
            - ACTIVE
            - INACTIVE
            - DELETED
        start_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Program validity start date (ISO 8601), or `null` when not set.
        end_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Program validity end date (ISO 8601), or `null` when not set.
        validity_hours:
          $ref: '#/components/schemas/ProgramValidityHours'
          description: Validity hours configuration. Defaults to type `ANY_TIME`.
        metadata:
          type: object
          description: Arbitrary key-value metadata. Defaults to `{}`.
        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), or `null` when never updated.
        object:
          type: string
          description: Object type marker.
          const: program
    Card:
      type: object
      description: A full loyalty card snapshot.
      properties:
        id:
          type: string
          pattern: ^lcrd_[a-f0-9]+$
          description: Identifies the card.
        program_id:
          type: string
          pattern: ^lprg_[a-f0-9]+$
          description: Identifies the loyalty program.
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: Identifies the card definition.
        card_type:
          type: string
          enum:
            - INDIVIDUAL
          description: Card type. Currently only `INDIVIDUAL` is supported.
        code:
          type:
            - string
            - 'null'
          description: >-
            Human-readable card code. `null` until asynchronous code generation
            finishes.
        lifetime_bucket:
          $ref: '#/components/schemas/CardLifetimeBucket'
          description: Lifetime point counters of the card.
        balance:
          $ref: '#/components/schemas/CardBalance'
          description: Current available balance calculated from the lifetime bucket.
        customer_id:
          type:
            - string
            - 'null'
          pattern: ^cust_[a-zA-Z0-9]+
          description: Identifies the customer linked to the card.
        member_id:
          type:
            - string
            - 'null'
          pattern: ^lmbr_[a-f0-9]+$
          description: Identifies the member linked to the card.
        created_at:
          type: string
          format: date-time
          description: Records when the card was created (ISO 8601).
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Records the last update (ISO 8601). `null` if the card has never
            been updated.
        object:
          type: string
          const: card
          description: Object type. Always `card`.
      required:
        - id
        - program_id
        - card_definition_id
        - card_type
        - code
        - lifetime_bucket
        - balance
        - created_at
        - updated_at
        - object
    MemberCard:
      type: object
      description: >-
        A member's loyalty card - the member's assignment to the card
        (`member_role`, `created_at`) combined with the card details in the
        `card` object.
      properties:
        member_role:
          type: string
          enum:
            - OWNER
            - MEMBER
          description: >-
            Role of the member on this card. Currently, loyalty program members
            can have only the `OWNER` role.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the card was assigned to the member (ISO 8601).
        card:
          description: The loyalty card details, or `null` when the card is not available.
          oneOf:
            - $ref: '#/components/schemas/CardSimple'
            - type: 'null'
        object:
          type: string
          const: member_card
          description: Object type marker, always `member_card`.
      required:
        - member_role
        - created_at
        - card
        - object
    ActivitySourceUser:
      type: object
      description: Dashboard user who triggered an activity.
      properties:
        id:
          type: string
          description: Identifies the user.
      required:
        - id
      additionalProperties: false
    ActivitySourceApiKey:
      type: object
      description: API key used to trigger an activity.
      properties:
        name:
          type: string
          description: API key name.
        app_id:
          type: string
          description: Application ID of the API key.
        client_app_id:
          type: string
          description: Client application ID of the API key.
      additionalProperties: false
    ProgramValidityHours:
      type: object
      description: Validity hours configuration of the program.
      properties:
        type:
          type: string
          description: Validity hours mode.
          enum:
            - DAILY
            - ANY_TIME
        daily:
          type: array
          description: Daily validity windows. Present only when `type` is `DAILY`.
          items:
            $ref: '#/components/schemas/ProgramValidityDailyHours'
    CardLifetimeBucket:
      type: object
      description: Lifetime points counters of a card.
      properties:
        points:
          $ref: '#/components/schemas/CardLifetimeBucketPoints'
          description: Lifetime counters of regular (active) points.
        pending_points:
          $ref: '#/components/schemas/CardLifetimeBucketPendingPoints'
          description: Lifetime counters of pending points.
      required:
        - points
        - pending_points
    CardBalance:
      type: object
      description: Current available balance of a card.
      properties:
        points:
          type: number
          description: Currently available regular points.
          default: 0
        pending_points:
          type: number
          description: Currently pending (not yet activated) points.
          default: 0
      required:
        - points
        - pending_points
    CardSimple:
      type: object
      description: >-
        A loyalty card in its simple representation, as embedded in member
        responses.
      properties:
        id:
          type: string
          pattern: ^lcrd_[a-f0-9]+$
          description: Unique Voucherify ID of the card.
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: >-
            Unique Voucherify ID of the card definition the card was created
            from.
        card_type:
          type: string
          enum:
            - INDIVIDUAL
          description: Card type. Currently only `INDIVIDUAL` is supported.
        code:
          type:
            - string
            - 'null'
          description: >-
            Human-readable card code. Card code generation is asynchronous -
            this field is `null` right after member creation and is populated
            shortly after, once the background code generation completes.
        lifetime_bucket:
          $ref: '#/components/schemas/CardLifetimeBucket'
          description: Lifetime point counters of the card.
        balance:
          $ref: '#/components/schemas/CardBalance'
          description: Current available balance calculated from the lifetime bucket.
        next_expiration:
          description: >-
            The nearest upcoming point expiration, or `null` when none is
            scheduled.
          oneOf:
            - $ref: '#/components/schemas/CardNextExpiration'
            - type: 'null'
        next_activation:
          description: >-
            The nearest upcoming pending point activation, or `null` when none
            is scheduled.
          oneOf:
            - $ref: '#/components/schemas/CardNextActivation'
            - type: 'null'
        object:
          type: string
          const: card
          description: Object type marker, always `card`.
      required:
        - id
        - card_definition_id
        - card_type
        - code
        - lifetime_bucket
        - balance
        - next_expiration
        - next_activation
        - object
    ProgramValidityDailyHours:
      type: object
      description: A single daily validity-hours window.
      properties:
        days_of_week:
          type: array
          description: Days of week the window applies to. 0 = Sunday through 6 = Saturday.
          items:
            type: integer
            minimum: 0
            maximum: 6
        start_time:
          type: string
          description: Window start time in `HH:mm` format.
        end_time:
          type: string
          description: Window end time in `HH:mm` format.
    CardLifetimeBucketPoints:
      type: object
      description: >-
        Lifetime counters of regular points. All counters default to 0. The
        available balance is calculated as: `total` - `subtracted` - `expired` -
        `spent` - `refunded` + `returned` - `locked` + `unlocked` -
        `purchased_reversed`.
      properties:
        total:
          type: number
          description: >-
            Total accumulated points, including points added manually, earned by
            fulfilling earning rules and activated from pending points
            (excluding returned points).
          default: 0
        earned:
          type: number
          description: >-
            Total points earned by fulfilling earning rules (does not include
            activated pending points or points added manually).
          default: 0
        added:
          type: number
          description: Total manually added points.
          default: 0
        purchased:
          type: number
          description: >-
            Total points purchased via a `LOYALTY_CARD_POINTS` reward (credited
            to the target card).
          default: 0
        purchased_reversed:
          type: number
          description: Total purchased points reversed via reward refund.
          default: 0
        subtracted:
          type: number
          description: Total manually subtracted points.
          default: 0
        expired:
          type: number
          description: Total expired points.
          default: 0
        spent:
          type: number
          description: Total points spent on rewards.
          default: 0
        refunded:
          type: number
          description: >-
            Total refunded points (points that were earned by products which
            were later returned).
          default: 0
        returned:
          type: number
          description: Total returned points (by returning a purchased reward).
          default: 0
        locked:
          type: number
          description: Total locked points (by locking a purchased reward).
          default: 0
        unlocked:
          type: number
          description: Total unlocked points (by unlocking a purchased reward).
          default: 0
      required:
        - total
        - earned
        - added
        - purchased
        - purchased_reversed
        - subtracted
        - expired
        - spent
        - refunded
        - returned
        - locked
        - unlocked
    CardLifetimeBucketPendingPoints:
      type: object
      description: >-
        Lifetime counters of pending points. The available pending balance is
        max(`total` - `activated` - `canceled`, 0).
      properties:
        total:
          type: number
          description: Total pending points ever added.
          default: 0
        activated:
          type: number
          description: Total pending points activated into regular points.
          default: 0
        canceled:
          type: number
          description: Total pending points canceled.
          default: 0
      required:
        - total
        - activated
        - canceled
    CardNextExpiration:
      type: object
      description: The nearest upcoming points expiration on a card.
      properties:
        points:
          type: number
          description: Number of points that will expire.
          default: 0
        date:
          type: string
          format: date
          description: Date when the points expire (`YYYY-MM-DD`).
      required:
        - points
        - date
    CardNextActivation:
      type: object
      description: >-
        The nearest upcoming pending points activation on a card. For the
        `EVENT_BASED` type, `date` is omitted and `cancel_date` is returned
        instead; for other types `date` is returned and `cancel_date` is
        omitted.
      properties:
        points:
          type: number
          description: Number of pending points to be activated.
          default: 0
        type:
          type: string
          enum:
            - IMMEDIATE
            - PERIOD_BASED
            - FIXED_DATES
            - EVENT_BASED
          description: Pending points activation type from the card definition.
        date:
          type: string
          format: date
          description: >-
            Activation date (`YYYY-MM-DD`). Present for all types except
            `EVENT_BASED`.
        cancel_date:
          type: string
          format: date
          description: >-
            Date when the pending points are canceled if the activating event
            does not occur (`YYYY-MM-DD`). Present only for the `EVENT_BASED`
            type.
      required:
        - points
        - type
  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

````