---
title: "List earning rule activities"
method: GET
path: "/v2/loyalties/earning-rules/{earningRuleId}/activities"
tags: ["Earning Rules"]
---

# List earning rule activities

`GET /v2/loyalties/earning-rules/{earningRuleId}/activities`

## Request

- Base URL: `https://api.voucherify.io`
- URL: `https://api.voucherify.io/v2/loyalties/earning-rules/{earningRuleId}/activities`
- Auth: none required

<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 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`.

## Path parameters

- `id` string, required

## Query parameters

- `limit` integer
- `order` union
  - 'created_at' | '-created_at'
  - string[]
- `cursor` string
- `filters` EarningRuleActivitiesListFilters: Filters for listing earning rule activities.
  - `junction` 'AND' | 'OR': How multiple field filters are combined. Nullable.
  - `id` object: 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.
    - `conditions` object, required
      - `$is` union: Exactly matches the value (single value).
        - string
        - string[]
      - `$is_not` union: Does not match the value (single value).
        - string
        - string[]
      - `$in` union: Matches any of the values (up to 100).
        - string
        - string[]
      - `$not_in` union: Matches none of the values (up to 100).
        - string
        - string[]
  - `type` object: Activity type filter (enum type). Allowed conditions: `$is`, `$is_not` (single value), `$in`, `$not_in` (up to 10 values). Nullable.
    - `conditions` object, required
      - `$is` union: Exactly matches the value (single value).
        - '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': Earning rule activity type.
        - EarningRuleActivityType[]
      - `$is_not` union: Does not match the value (single value).
        - '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': Earning rule activity type.
        - EarningRuleActivityType[]
      - `$in` union: Matches any of the values (up to 10).
        - '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': Earning rule activity type.
        - EarningRuleActivityType[]
      - `$not_in` union: Matches none of the values (up to 10).
        - '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': Earning rule activity type.
        - EarningRuleActivityType[]
  - `created_at` EarningRuleDateFilterConditions: 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.
    - `conditions` object, required
      - `$before` union: Before the given date (single date string).
        - string
        - string[]
      - `$after` union: After the given date (single date string).
        - string
        - string[]
      - `$is` union: Exactly N days ago (non-negative integer).
        - string
        - string[]
      - `$more_than` union: More than N days ago (non-negative integer).
        - string
        - string[]
      - `$less_than` union: Less than N days ago (non-negative integer).
        - string
        - string[]
      - `$has_value` string: Field has a value (presence check).
      - `$is_unknown` string: Field has no value (absence check).

## Response `200`

Paginated list of earning rule activities

- EarningRuleActivitiesListResponse: Cursor-paginated list of earning rule activities.
  - `data` EarningRuleActivityResponse[]: Activities on the current page.
    - `id` string: Activity ID (`laer_...`).
    - `earning_rule_id` string: ID of the earning rule the activity belongs to.
    - `type` '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': Earning rule activity type.
    - `data` object: 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).
    - `created_at` string, date-time: Activity timestamp (ISO 8601).
    - `group_id` string: Groups related activities recorded together.
    - `source` EarningRuleActivitySource: Origin of the activity.
      - `channel` 'USER_PORTAL' | 'API' | 'CLIENT_API' | 'INTERNAL': Channel through which the change was made.
      - `user` object: User who made the change (present for USER_PORTAL channel).
        - `id` string: User ID.
      - `api_key` object: API key used to make the change (present for API/CLIENT_API channels).
        - `name` string: API key name.
        - `app_id` string: Application ID of the API key.
        - `client_app_id` string: Client application ID (for CLIENT_API keys).
  - `cursor` object: Pagination cursor. Null when there are no more results.
    - `next` string: Cursor ID to pass as the `cursor` query parameter (matches `^lcrsaer_[a-f0-9]+$`).
    - `expires_at` string, date-time: Cursor expiration timestamp.
  - `object` string: Object type marker. Always `list`.

## Other responses

- `400`: Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.
- `404`: Resource not found.
- `409`: Conflict - e.g. duplicate resource or invalid state transition.
- `500`: Internal server error.

---

[API](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions.md) - [All operations](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions/llms.txt) - [OpenAPI document](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions/revisions/4982266e0494?raw)
