---
title: 'Get Loyalty Rules'
description: 'Retrieve configured loyalty rules with optional pagination and filters'
openapi: GET /api/loyalty/rules
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

`GET /api/loyalty/rules` — query parameters: `organizationId`, `websiteId`, `collectionAddress`, `loyaltyRuleGroupId`, `startingAfter`, `limit`, `loyaltyRuleId`, `isActive`, `allotedToUserId`, `allotedUserGroupId`, `isSpecial`, `includeDeleted`

`GET https://admin.snagsolutions.io/api/loyalty/rules`

Retrieve configured loyalty rules with optional pagination and filters

## Authentication

- `apiKeyAuth` — apiKey in header: `X-API-KEY`

## Query parameters

- `organizationId` (string) — Unique identifier for the organization to filter by
- `websiteId` (string) — Unique identifier for the website to filter by
- `collectionAddress` (string) — Address of the collection to filter by
- `loyaltyRuleGroupId` (string) — ID(s) of the loyalty rule group(s) to filter results. Single ID or array for multiple groups (shared cursor when multiple).
- `startingAfter` (string) — Pagination cursor to start after a specific resource ID
- `limit` (number) — Maximum number of records to return (max 100)
- `loyaltyRuleId` (string) — The IDs of the loyalty rule
- `isActive` (string) — If true this will only return active rules, the rules for which the startTime is in the past and the endTime is in the future
- `allotedToUserId` (string) — IDs of the users to filter results by
- `allotedUserGroupId` (string) — ID of the user group to filter results by
- `isSpecial` (string) — If true this will only return special rules, special rules are the rules that are used for anti sybil as honey pot
- `includeDeleted` (boolean) — Whether to include deleted/archived records

## Response 200

200
  - response (object)
    - `data` (array, required)
      - `items` (object)
        - `id` (string, uuid, required) — Unique identifier for the loyalty rule
        - `name` (string, required) — Name of the loyalty rule
        - `description` (string, required) — Description of the loyalty rule
        - `endTime` (string, required) — End time of the loyalty rule
        - `startTime` (string, required) — Start time of the loyalty rule
        - `rewardType` (string, required, one of: points, multiplier, badge, token) — Type of the reward
        - `organizationId` (string, uuid, required) — Unique identifier for the organization
        - `websiteId` (string, uuid, required) — Unique identifier for the website
        - `collectionAddress` (string) — Optional address of the collection
        - `type` (string, required) — Type of the loyalty rule
        - `frequency` (string, required) — Frequency of the loyalty rule
        - `amount` (number, required) — Amount associated with the loyalty rule
        - `createdAt` (string, date-time, required) — Timestamp when the loyalty rule was created
        - `updatedAt` (string, date-time, required) — Timestamp when the loyalty rule was last updated
        - `deletedAt` (string, date-time, required) — Timestamp when the loyalty rule was deleted (if applicable)
        - `mediaUrl` (string) — URL of the media associated with the loyalty rule
        - `metadata` (object) — Optional metadata for the loyalty rule
        - `dappDeployedWithin` (string, one of: daily, weekly, monthly) — Filter dApps by deployment age before ranking.
        - `dappDataWindow` (string, one of: daily, weekly, monthly) — Reward based on data usage within the last day, week, or month. Leave it empty for all time usage.
        - `trackProgress` (boolean) — Flag indicating if the progress is tracked. If enabled, the rule can only be completed once the progress is 100%.
        - `progressType` (string, one of: counter, percentage) — How tracked progress is interpreted. "percentage" counts 0-100 and is shown as a percentage. "counter" counts up to the highest reward range end and is shown as a raw count.
        - `loyaltyRuleChain` (array, required) — Chains attached to the loyalty rule
          - `items` (object)
            - id: … (nested further)
            - name: … (nested further)
            - loyaltyRuleId: … (nested further)
            - operatorType: … (nested further)
            - loyaltyConditions: … (nested further)
    - `hasNextPage` (boolean, required)

## Response 403

403
  - response (object) — Schema for forbidden response
    - `message` (string, required) — Error message


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.snagsolutions.io/api-specs.zip
