> ## 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 earning rule activities

> 
<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 activities (audit trail) for a single earning rule.
The same field cannot be used in both ascending and descending order at once.
Default order is `-created_at`.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/earning-rules/{earningRuleId}/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, 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/earning-rules/{earningRuleId}/activities:
    get:
      tags:
        - Earning Rules
      summary: List earning rule activities
      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 activities (audit trail) for a single
        earning rule.

        The same field cannot be used in both ascending and descending order at
        once.

        Default order is `-created_at`.
      operationId: listEarningRuleActivities
      parameters:
        - name: id
          in: path
          required: true
          description: Earning rule ID.
          schema:
            type: string
            pattern: ^lern_[a-f0-9]+$
        - name: limit
          in: query
          required: false
          description: Number of items to return. Between 1 and 100, defaults to 10.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: order
          in: query
          required: false
          description: >-
            Sort order. A single value or repeated parameter. Allowed values:
            `created_at`, `-created_at`. Defaults to `-created_at`.
          explode: true
          schema:
            oneOf:
              - type: string
                enum:
                  - created_at
                  - '-created_at'
              - type: array
                items:
                  type: string
                  enum:
                    - created_at
                    - '-created_at'
        - name: cursor
          in: query
          required: false
          description: >-
            Pagination cursor returned in `cursor.next` of a previous response.
            Must match the pattern `^lcrsaer_[a-f0-9]+$`.
          schema:
            type: string
            pattern: ^lcrsaer_[a-f0-9]+$
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Filters as a deep object, e.g.
            `filters[type][conditions][$is]=vl.earning_rule.updated`.
          schema:
            $ref: '#/components/schemas/EarningRuleActivitiesListFilters'
      responses:
        '200':
          description: Paginated list of earning rule activities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarningRuleActivitiesListResponse'
        '400':
          description: >-
            Validation error - request body or query parameters failed
            validation, or the operation is not allowed in the current resource
            state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict - e.g. duplicate resource or 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:
    EarningRuleActivitiesListFilters:
      type: object
      description: Filters for listing earning rule activities.
      properties:
        junction:
          description: How multiple field filters are combined. Nullable.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        id:
          description: >-
            Activity ID filter. Allowed conditions: `$is`, `$is_not` (single
            value), `$in`, `$not_in` (up to 100 values). Values must match
            `^laer_[a-f0-9]+$`. Nullable.
          oneOf:
            - type: object
              required:
                - conditions
              additionalProperties: false
              properties:
                conditions:
                  type: object
                  minProperties: 1
                  additionalProperties: false
                  properties:
                    $is:
                      description: Exactly matches the value (single value).
                      oneOf:
                        - type: string
                          pattern: ^laer_[a-f0-9]+$
                        - type: array
                          minItems: 1
                          maxItems: 1
                          items:
                            type: string
                            pattern: ^laer_[a-f0-9]+$
                    $is_not:
                      description: Does not match the value (single value).
                      oneOf:
                        - type: string
                          pattern: ^laer_[a-f0-9]+$
                        - type: array
                          minItems: 1
                          maxItems: 1
                          items:
                            type: string
                            pattern: ^laer_[a-f0-9]+$
                    $in:
                      description: Matches any of the values (up to 100).
                      oneOf:
                        - type: string
                          pattern: ^laer_[a-f0-9]+$
                        - type: array
                          minItems: 1
                          maxItems: 100
                          items:
                            type: string
                            pattern: ^laer_[a-f0-9]+$
                    $not_in:
                      description: Matches none of the values (up to 100).
                      oneOf:
                        - type: string
                          pattern: ^laer_[a-f0-9]+$
                        - type: array
                          minItems: 1
                          maxItems: 100
                          items:
                            type: string
                            pattern: ^laer_[a-f0-9]+$
            - type: 'null'
        type:
          description: >-
            Activity type filter (enum type). Allowed conditions: `$is`,
            `$is_not` (single value), `$in`, `$not_in` (up to 10 values).
            Nullable.
          oneOf:
            - type: object
              required:
                - conditions
              additionalProperties: false
              properties:
                conditions:
                  type: object
                  minProperties: 1
                  additionalProperties: false
                  properties:
                    $is:
                      description: Exactly matches the value (single value).
                      oneOf:
                        - $ref: '#/components/schemas/EarningRuleActivityType'
                        - type: array
                          minItems: 1
                          maxItems: 1
                          items:
                            $ref: '#/components/schemas/EarningRuleActivityType'
                    $is_not:
                      description: Does not match the value (single value).
                      oneOf:
                        - $ref: '#/components/schemas/EarningRuleActivityType'
                        - type: array
                          minItems: 1
                          maxItems: 1
                          items:
                            $ref: '#/components/schemas/EarningRuleActivityType'
                    $in:
                      description: Matches any of the values (up to 10).
                      oneOf:
                        - $ref: '#/components/schemas/EarningRuleActivityType'
                        - type: array
                          minItems: 1
                          maxItems: 10
                          items:
                            $ref: '#/components/schemas/EarningRuleActivityType'
                    $not_in:
                      description: Matches none of the values (up to 10).
                      oneOf:
                        - $ref: '#/components/schemas/EarningRuleActivityType'
                        - type: array
                          minItems: 1
                          maxItems: 10
                          items:
                            $ref: '#/components/schemas/EarningRuleActivityType'
            - type: 'null'
        created_at:
          description: Creation date filter. Nullable.
          oneOf:
            - $ref: '#/components/schemas/EarningRuleDateFilterConditions'
            - type: 'null'
      additionalProperties: false
    EarningRuleActivitiesListResponse:
      type: object
      description: Cursor-paginated list of earning rule activities.
      properties:
        data:
          type: array
          description: Activities on the current page.
          items:
            $ref: '#/components/schemas/EarningRuleActivityResponse'
        cursor:
          type:
            - object
            - 'null'
          description: Pagination cursor. Null when there are no more results.
          properties:
            next:
              type: string
              description: >-
                Cursor ID to pass as the `cursor` query parameter (matches
                `^lcrsaer_[a-f0-9]+$`).
            expires_at:
              type: string
              format: date-time
              description: Cursor expiration timestamp.
        object:
          type: string
          const: list
          description: Object type marker. Always `list`.
    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.
    EarningRuleActivityType:
      type: string
      description: Earning rule activity type.
      enum:
        - vl.earning_rule.created
        - vl.earning_rule.updated
        - vl.earning_rule.deleted
        - vl.earning_rule.activated
        - vl.earning_rule.deactivated
        - vl.earning_rule.drafted
        - vl.earning_rule.assigned
        - vl.earning_rule.unassigned
    EarningRuleDateFilterConditions:
      type: object
      description: >-
        Date field filter conditions. `$before` and `$after` take a date string;
        `$is`, `$more_than` and `$less_than` take a non-negative integer number
        of days (relative comparison); `$has_value` and `$is_unknown` are
        presence checks.
      required:
        - conditions
      additionalProperties: false
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $before:
              description: Before the given date (single date string).
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
            $after:
              description: After the given date (single date string).
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
            $is:
              description: Exactly N days ago (non-negative integer).
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
            $more_than:
              description: More than N days ago (non-negative integer).
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
            $less_than:
              description: Less than N days ago (non-negative integer).
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
            $has_value:
              description: Field has a value (presence check).
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
            $is_unknown:
              description: Field has no value (absence check).
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
    EarningRuleActivityResponse:
      type: object
      description: A single earning rule activity.
      properties:
        id:
          type: string
          pattern: ^laer_[a-f0-9]+$
          description: Activity ID (`laer_...`).
        earning_rule_id:
          type: string
          pattern: ^lern_[a-f0-9]+$
          description: ID of the earning rule the activity belongs to.
        type:
          $ref: '#/components/schemas/EarningRuleActivityType'
        data:
          type: object
          description: >-
            Activity payload. For
            created/updated/deleted/activated/deactivated/drafted activities it
            contains an `earning_rule` snapshot (the full earning rule object at
            the time of the change).
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          description: Activity timestamp (ISO 8601).
        group_id:
          type: string
          description: Groups related activities recorded together.
        source:
          $ref: '#/components/schemas/EarningRuleActivitySource'
          description: Origin of the activity. Absent when not recorded.
    EarningRuleActivitySource:
      type: object
      description: Origin of the activity.
      properties:
        channel:
          type: string
          enum:
            - USER_PORTAL
            - API
            - CLIENT_API
            - INTERNAL
          description: Channel through which the change was made.
        user:
          type: object
          description: User who made the change (present for USER_PORTAL channel).
          properties:
            id:
              type: string
              description: User ID.
        api_key:
          type: object
          description: >-
            API key used to make the change (present for API/CLIENT_API
            channels).
          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 (for CLIENT_API keys).
  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

````