Pagination
List endpoints in Cleos use offset pagination with page and pageSize query parameters unless noted below.
Standard shape
Many resources (for example patients, inventory) respond with:
{
"data": [ /* rows */ ],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 240,
"totalPages": 12
}
}
| Parameter | Default | Max |
|---|---|---|
page | 1 | — |
pageSize | often 20 | often 100 (invoices may allow higher caps) |
page is 1-based. Requesting a page beyond totalPages typically returns an empty data array.
Alternate shapes
Some list routes return pagination fields at the top level instead of a nested pagination object, for example:
{
"data": [],
"total": 0,
"page": 1,
"pageSize": 20
}
Purchase requisitions and suppliers follow this pattern.
Appointments
GET /api/appointments defaults pageSize to all, returning every matching row in the date range (capped internally). Pass an integer pageSize to limit results.
Reports
Report GET routes under /api/reports/* accept page and pageSize where the underlying report supports tabular pagination (for example service sales). See Reports.