Pagination
New standard: Offset-based pagination
New listing endpoints (contract-bundles, application-bundles, draft-applications, company-contracts) use offset-based pagination with the following query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | integer | 0 | Page number (0-based) |
| size | integer | 50 | Number of items per page (1–100) |
The response includes pagination metadata alongside the data:
{
"data": [ ... ],
"page": 0,
"size": 50,
"totalElements": 142,
"totalPages": 3,
"hasMore": true
}
-
totalElements — Total number of records matching the query across all pages.
-
totalPages — Total number of pages available at the current page size.
-
hasMore — true if there are more pages after the current one.
-
Results are ordered by ID descending (newest first).
This approach makes it straightforward to build paginated UIs, jump to specific pages, and display total counts without additional API calls.
Legacy standard: Cursor-based pagination
Existing endpoints (/members, /groups, /plans) continue to use cursor-based pagination via the startingAfter and endingBefore parameters:
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of items to return |
| startingAfter | long | Returns items with ID greater than this value (ascending order |
| endingBefore | long | Returns items with ID less than this value (descending order |
These parameters are mutually exclusive — only one of startingAfter or endingBefore may be used per request. The response includes a hasMore boolean indicating whether additional items exist beyond the current page.
Cursor-based pagination is efficient for sequential scrolling through large datasets but does not support jumping to arbitrary pages or reporting total counts.
Updated about 1 month ago
