drawerLedger
query · in the family Reading your records
What it does
The drawer’s cash movements for one till session — every entry, in order.
With the tillSession GET (cached drawerTotals + counted/overShort) this IS the X/Z-report data (rendered artifacts = the reports family).
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
- Sales Associate
- Cashier
- An API key whose scope allows
api:drawerLedger
What happens
Reads only.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
tillSessionId | ID ID! | yes | |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
before | ID | no |
Returns
CashEntry [CashEntry!]! — ONE posted cash-drawer ledger fact: the sign is the direction (positive = cash into the drawer).
Example request
graphql
query ExampleDrawerLedger($tillSessionId: ID!, $limit: Int) {
drawerLedger(tillSessionId: $tillSessionId, limit: $limit) {
id
type
caption
status
parentId
rootId
entryType
currency
amountMinor
reason
glCategory
refs
overdrawn
createdAt
updatedAt
revision
revisionNum
}
}Variables:
json
{
"tillSessionId": "01900000-0000-7000-8000-4ed885220000",
"limit": 1
}Example response
json
{
"data": {
"drawerLedger": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"entryType": "float_in",
"currency": "USD",
"amountMinor": 1250,
"reason": "Correcting a miscount.",
"glCategory": "<gl category>",
"refs": [
"<refs>"
],
"overdrawn": true,
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revision": "01900000-0000-7000-8000-53c6eea90000",
"revisionNum": 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. 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)