# registryFulfillments

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

## What it does

Who bought what against one registry — the fulfilment audit.

ONE registry's fulfillment facts, OLDEST-FIRST + born-paginated: with the item rows this IS the purchased/remaining story (purchased = Σ qty; remaining floors 0). registryId is the REQUIRED anchor. Requires authentication.

## What happens

Reads only.

## Who may call it

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

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

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `registryId` | [ID](/types/#scalars) `ID!` | yes | 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

[RegistryFulfillmentPage](/types/RegistryFulfillmentPage/) `RegistryFulfillmentPage!` — One page of a registry's fulfillment facts.

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 ExampleRegistryFulfillments($registryId: ID!, $limit: Int) {
  registryFulfillments(registryId: $registryId, limit: $limit) {
    items {
      id
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      registryItemId
      orderId
      orderLineNo
      qty
      purchaserConsumerId
    }
    nextToken
  }
}
```

Variables:

```json
{
  "registryId": "01900000-0000-7000-8000-5a9f6ff30000",
  "limit": 1
}
```

## Example response

```json
{
  "data": {
    "registryFulfillments": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "type": "<type>",
          "caption": "Blue jeans",
          "status": "<status>",
          "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",
          "registryItemId": "01900000-0000-7000-8000-647eb9380000",
          "orderId": "01900000-0000-7000-8000-f6d8263a0000",
          "orderLineNo": 1,
          "qty": 1,
          "purchaserConsumerId": "01900000-0000-7000-8000-d1660c310000"
        }
      ],
      "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/))
