# receiptLines

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

## What it does

The lines on one goods receipt — which purchase-order lines arrived, how many of each, and where they landed.

ONE Receipt's own lines, lineNo-ORDERED + born-paginated. receiptId is the REQUIRED anchor (tenant-scoped — a cross-tenant/missing receipt refuses NOT_FOUND, never an empty page). 'nextToken' = the prior page's cursor, verbatim (opaque; malformed/foreign → VALIDATION/INVALID). Requires authentication.

## What happens

Reads only — changes nothing. Comes a page at a time, in line order, and can be narrowed by quantity, by how the arrival was routed (accepted, held, damaged), by bin or by pack.

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

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `receiptId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |
| `filter` | [FilterInput](/types/FilterInput/) | no | Which records to answer — clauses over the family’s filterable fields (the FilterInput type and the paging guide carry the grammar). |
| `sort` | [SortInput](/types/SortInput/) | no | The order to answer in — one declared field and a direction (the SortInput type carries the grammar). |
| `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

[ReceiptLinePage](/types/ReceiptLinePage/) `ReceiptLinePage!` — One page of a Receipt's own line collection.

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 ExampleReceiptLines($receiptId: ID!, $limit: Int) {
  receiptLines(receiptId: $receiptId, limit: $limit) {
    items {
      lineNo
      poLineNo
      quantityReceived
      disposition
      heldReason
      binId
      purchasePackId
      packQuantity
    }
    nextToken
    matchCount
  }
}
```

Variables:

```json
{
  "receiptId": "01900000-0000-7000-8000-458bf62e0000",
  "limit": 1
}
```

## Example response

```json
{
  "data": {
    "receiptLines": {
      "items": [
        {
          "lineNo": 1,
          "poLineNo": 1,
          "quantityReceived": "<quantity received>",
          "disposition": "accept",
          "heldReason": "<held reason>",
          "binId": "01900000-0000-7000-8000-20867aa30000",
          "purchasePackId": "01900000-0000-7000-8000-031157c60000",
          "packQuantity": 1
        }
      ],
      "nextToken": "<the cursor from the previous page>",
      "matchCount": 1
    }
  },
  "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/))
