receiptLines
query · in the family 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.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Reading your records — Looking up and listing the records of your organization.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:receiptLines
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.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
receiptId | ID ID! | yes | |
filter | FilterInput | no | The structured filter: AND across clauses · OR within a clause's values; max 8 clauses, one clause per (field, operator) pair. |
sort | SortInput | no | One sort key: missing-fact records trail in either direction; ties resolve by id, so every order is total and pages are stable. |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
Returns
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.
Example request
query ExampleReceiptLines($receiptId: ID!, $limit: Int) {
receiptLines(receiptId: $receiptId, limit: $limit) {
items {
lineNo
poLineNo
quantityReceived
disposition
heldReason
binId
purchasePackId
packQuantity
}
nextToken
matchCount
matchCountExact
}
}Variables:
{
"receiptId": "01900000-0000-7000-8000-1b9120e30000",
"limit": 1
}Example response
{
"data": {
"receiptLines": {
"items": [
{
"lineNo": 1,
"poLineNo": 1,
"quantityReceived": "<quantity received>",
"disposition": "accept",
"heldReason": "<held reason>",
"binId": "01900000-0000-7000-8000-bfd16c5e0000",
"purchasePackId": "01900000-0000-7000-8000-f00805cb0000",
"packQuantity": 1
}
],
"nextToken": "<the cursor from the previous page>",
"matchCount": 1,
"matchCountExact": true
}
},
"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. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)