On this page
drawerLedger
query · in the family Reading your records
What it does
The drawer’s cash movements for one till session — every entry, in order.
The CashEntry ledger of ONE TillSession, NEWEST-FIRST + bounded: 'limit' clamps server-side; 'before' = the prior page's oldest entry id (exclusive — walk backward in time). With the tillSession GET (cached drawerTotals + counted/overShort) this IS the X/Z-report data (rendered artifacts = the reports family). Requires authentication; the session is tenant-scoped server-side.
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:drawerLedger
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
tillSessionId | ID ID! | yes | No further notes. |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
before | ID | no | No further notes. |
Returns
CashEntry [CashEntry!]! — ONE posted cash-drawer ledger fact: the SIGN is the direction (positive = cash INTO the drawer). sysId-LESS (the class); IMMUTABLE — NO update or doom op exists (corrections are NEW compensating entries); posted ONLY by openTillSession (float_in), recordCashEntry (the manual subset), closeTillSession (count_adjust), and the tender writers (cash_sale/cash_refund/change_given) — each in ONE transaction with the drawerTotals cache stamp.
Example request
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:
{
"tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
"limit": 1
}
Example response
{
"data": {
"drawerLedger": [
{
"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",
"entryType": "float_in",
"currency": "USD",
"amountMinor": 1,
"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-b7960e180000",
"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. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)