Overview
The Intermezzo API uses cursor-based pagination for list endpoints to efficiently handle large result sets. Pagination parameters are passed as query parameters in your requests.Pagination Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (minimum: 1) |
size | integer | 10 | Items per page (range: 1-100) |
sort_by | string | null | Field to sort results by |
sort_order | string | ”asc” | Sort order: “asc” or “desc” |
Making Paginated Requests
Response Structure
All paginated responses include two main sections:items
An array containing the actual data for the current page.meta
Pagination metadata containing:total: Total number of items across all pagespage: Current page numbersize: Number of items per pagepages: Total number of pageshas_next: Boolean indicating if there’s a next pagehas_prev: Boolean indicating if there’s a previous page
Advanced Filtering
You can combine pagination with search and filtering capabilities:Best Practices
Error Handling
The API will return appropriate errors for invalid pagination parameters:Invalid Page Size
Invalid Sort Order