Docs/Resources
Pagination
Page through long lists with limit and offset.
All list endpoints use offset-based pagination with a consistent interface.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | Int | 25 | Number of items per page (max 200) |
offset | Int | 0 | Number of items to skip |
search | String | — | Case-insensitive text filter (searches relevant fields like name, memo, etc.) |
sortBy | String | — | Field to sort by (e.g. name, currentBalance, txnDate) |
sortDir | String | asc | Sort direction: asc or desc |
Response shape
Every paginated response includes:
items: the array of resultstotalCount: total number of matching records (before pagination)pageSize: thelimitthat was appliedoffset: theoffsetthat was applied
To check if there are more pages: offset + items.length < totalCount.
Requesting beyond the end of the data returns an empty items array, not an error.
Example
Request
# Page 1: first 10 accounts
query {
listAccounts(
organizationId: "a1b2c3d4-..."
limit: 10
offset: 0
sortBy: "name"
sortDir: "asc"
) {
items { id name currentBalance }
totalCount
pageSize
offset
}
}
# Page 2: next 10
query {
listAccounts(
organizationId: "a1b2c3d4-..."
limit: 10
offset: 10
sortBy: "name"
sortDir: "asc"
) {
items { id name currentBalance }
totalCount
pageSize
offset
}
}Response
# Page 1 response
{
"data": {
"listAccounts": {
"items": [
{ "id": "...", "name": "Accounts Payable", "currentBalance": 4200.00 },
{ "id": "...", "name": "Accounts Receivable", "currentBalance": 12400.00 }
],
"totalCount": 24,
"pageSize": 10,
"offset": 0
}
}
}
# Last page (fewer items than limit)
{
"data": {
"listAccounts": {
"items": [
{ "id": "...", "name": "Travel", "currentBalance": 890.00 }
],
"totalCount": 24,
"pageSize": 10,
"offset": 20
}
}
}