---
title: 'Get loyalty accounts'
description: 'Get loyalty accounts'
openapi: GET /api/loyalty/accounts
---

> **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/accounts` — query parameters: `organizationId`, `websiteId`, `startingAfter`, `limit`, `walletAddress`, `userId`, `walletGroupIdentifier`, `sortDir`, `loyaltyCurrencyId`, `userGroupExternalIdentifier`, `userGroupId`, `externalIdentifier`, `excludeDeletedCurrency`

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

Get loyalty accounts

## 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
- `startingAfter` (string) — Pagination cursor to start after a specific account ID
- `limit` (integer) — Maximum number of accounts to return
- `walletAddress` (string) — Wallet address(es) to filter accounts by
- `userId` (string) — User ID(s) to filter accounts by. Pass in null to get a currencys main accounts.
- `walletGroupIdentifier` (string) — Wallet group identifier to filter accounts by
- `sortDir` (string) — Order the accounts in ascending or descending order, sorted by amount
- `loyaltyCurrencyId` (string) — Loyalty currency ID(s) to filter accounts by. Accepts a single id or a list.
- `userGroupExternalIdentifier` (string) — External identifier for the user group controlled by you
- `userGroupId` (string) — Unique identifier for the user group
- `externalIdentifier` (string) — External identifier for the user
- `excludeDeletedCurrency` (string) — Pass true to drop accounts belonging to deleted loyalty currencies. Defaults to false, so they are included. Ignored when loyaltyCurrencyId names a currency — a deleted currency returns its accounts either way.

## Response 200

200
  - response (object) — Schema for the response of getting loyalty accounts
    - `data` (array, required) — Array of loyalty accounts
      - `items` (object) — Schema for a loyalty account
        - `id` (string, uuid, required) — Unique identifier for the loyalty account
        - `loyaltyCurrencyId` (string, uuid, required) — Unique identifier for the loyalty currency
        - `userId` (string, uuid, required) — Unique identifier for the user
        - `user` (required) — User associated with the loyalty account
          - (oneOf)
            - value: … (nested further)
            - value: … (nested further)
    - `hasNextPage` (boolean, required) — Indicates if there is a next page of results
    - `message` (string) — Optional message

## Response 400

400
  - response (object) — Schema for bad request response
    - `message` (string, required) — Error message

## Response 403

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

## Response 429

429
  - response (object) — Schema for too many request response
    - `message` (string, required) — Error message

## Response 500

500
  - response (object) — Schema for internal server error response
    - `success` (boolean, required) — Indicates operation success
    - `message` (string, required) — Error message
    - `debugInfo` (string) — Optional debug information


---

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