Skip to content

Collection endpoints (list endpoints such as POST /gql/v1/clients) use limit/offset pagination controlled by two body parameters.

ParameterMeaning
pageSizeA limit: how many records to return. Default 50, maximum 1000.
pageAn offset: how many records to skip. It is not a 0-based or 1-based page number.

To read the next block of records, advance page by pageSize.

Knowing when you have reached the end

Every collection response includes an aggregate count:

{
  "total": { "aggregate": { "count": 25156 } }
}

Use total.aggregate.count to know how many records exist. When page is greater than or equal to that count, the data array comes back empty.

Worked example

With 25,156 clients and pageSize: 1000:

RequestRecords returned
pageSize: 1000, page: 0records 1–1000
pageSize: 1000, page: 1000records 1001–2000
pageSize: 1000, page: 25000records 25001–25156 (156 rows)
pageSize: 1000, page: 25156empty array

Do not send page: 26 expecting "page 26" of 1,000-record pages. That skips only 26 records and still returns a full pageSize of results.

This limit/offset model is the stable v1 contract and will not change. A future API version may introduce conventional page-number pagination under a new version prefix.

Endpoints that page by page number

These endpoints use a zero-based page number instead of the offset model above.

Webhook subscriptions and delivery history

GET /api/v1/event-subscriptions and GET /api/v1/event-subscriptions/{id}/deliveries take two optional query parameters:

ParameterMeaning
pageZero-based page number. Default 0; must not be negative.
limitPage size. Default 50, between 1 and 1000.

An out-of-range page or limit returns 400. data is a page:

{ "content": [], "totalElements": 0, "totalPages": 0, "currentPage": 0, "hasNext": false, "hasPrevious": false }

Time management code and entry lookups

POST /api/v1/codes/batch/{type}, POST /api/v1/entries/batch/{type}, the per-type code lookups (POST /api/v1/time-codes/batch, /api/v1/expense-codes/batch, /api/v1/operational-codes/batch and /api/v1/pto-codes/batch) and the per-type entry lookups (POST /api/v1/time-entries/batch, /api/v1/expense-entries/batch, /api/v1/operational-entries/batch and /api/v1/pto-entries/batch) take a body such as { "pageSize": 25, "page": 0 }:

ParameterMeaning
pageSizeRecords per page, 1 to 100. Default 25; a value outside that range returns 400.
pageZero-based page index (default 0). The lookup skips page * pageSize records.

A page beyond the last record returns no records.