# loyaltyMembers

query · in the family [Loyalty member](/reference/loyalty-member/)

## What it does

The loyalty member list — each entry is a customer’s membership in your loyalty program.

The caller's org-group family's ACTIVE LISTING of LoyaltyMembers — doomed records DROP from listings. PAGINATED: `limit` clamps to \[1, 200], default 100; `nextToken` = the prior page's cursor, verbatim — opaque + tenant-bound (a malformed or foreign token → VALIDATION/INVALID). Walk until `nextToken` is null (a page may hold fewer than `limit` — doomed drop per page). FILTERS: `programId` — Only members of THIS program (the header parentId). `status` — Only members in THIS FSM status (active|inactive — doomed never lists). `email` — Only members whose NORMALIZED identity email equals this value (normalized server-side — the POS lookup lane).

## What happens

Reads only — changes nothing.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:loyaltyMembers`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `programId` | [ID](/types/#scalars) | no | No further notes. |
| `status` | [String](/types/#scalars) | no | No further notes. |
| `email` | [String](/types/#scalars) | no | No further notes. |
| `limit` | [Int](/types/#scalars) | no | How many records to answer at most; a page may hold fewer. |
| `nextToken` | [String](/types/#scalars) | no | The cursor from the previous page, passed back exactly as received. |

## Returns

[LoyaltyMemberPage](/types/LoyaltyMemberPage/) `LoyaltyMemberPage!` — One page of the loyaltyMembers listing — the records + the opaque resume cursor.

This is a page: `items` holds the records and `nextToken` the cursor for the next page — pass it back verbatim until it is null. See [paging](/guides/paging-and-the-cursor-grammar/).

## Example request

```graphql
query ExampleLoyaltyMembers($programId: ID) {
  loyaltyMembers(programId: $programId) {
    items {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      pointsBalance
      currentTier
      priceGroupId
      consumerId
    }
    nextToken
  }
}
```

Variables:

```json
{
  "programId": "01900000-0000-7000-8000-892c2b660000"
}
```

## Example response

```json
{
  "data": {
    "loyaltyMembers": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "sysId": "LM-EXMP-0000-000F",
          "type": "LoyaltyMember",
          "caption": "Blue jeans",
          "status": "active",
          "parentId": "01900000-0000-7000-8000-065235280000",
          "rootId": "01900000-0000-7000-8000-a093dd800000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-b7960e180000",
          "pointsBalance": 1,
          "currentTier": "<current tier>",
          "priceGroupId": "01900000-0000-7000-8000-c7ffbf680000",
          "consumerId": "01900000-0000-7000-8000-6e8c92ec0000"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
