# affiliateEntryList

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

The ledger of what an affiliate has earned, entry by entry.

The AffiliateEntry ledger read.

## What happens

Reads only — the maths behind an affiliate’s payout.

## 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:affiliateEntryList`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `affiliateId` | [ID](/types/#scalars) | no | No further notes. |
| `from` | [String](/types/#scalars) | no | No further notes. |
| `to` | [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

[AffiliateEntryPage](/types/AffiliateEntryPage/) `AffiliateEntryPage!` — One affiliateEntryList page.

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 ExampleAffiliateEntryList($affiliateId: ID) {
  affiliateEntryList(affiliateId: $affiliateId) {
    items {
      id
      parentId
      entryType
      amountMinor
      currency
      basisMinor
      ratePpm
      orderId
      returnId
      caption
      createdAt
    }
    nextToken
  }
}
```

Variables:

```json
{
  "affiliateId": "01900000-0000-7000-8000-ab1bc9b90000"
}
```

## Example response

```json
{
  "data": {
    "affiliateEntryList": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "parentId": "01900000-0000-7000-8000-065235280000",
          "entryType": "earn",
          "amountMinor": 1,
          "currency": "USD",
          "basisMinor": 1,
          "ratePpm": 1,
          "orderId": "01900000-0000-7000-8000-f6d8263a0000",
          "returnId": "01900000-0000-7000-8000-4d4c03d20000",
          "caption": "Blue jeans",
          "createdAt": "2027-01-31T00:00:00.000Z"
        }
      ],
      "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/))
