Pagination
The Offerte Adviseur API uses pagination to handle large result sets. By default, all list endpoints return 10 items per page. You can customize this using the per_page
parameter, up to a maximum of 100 items.
When an API response returns a list of objects, they are nested in a data
attribute and include pagination metadata in the links
and meta
attributes. The links
object provides URLs for navigating between pages, while the meta
object contains information about the current page and total results.
Pagination parameters
You can control pagination using these query parameters:
- Name
page
- Type
- integer
- Description
The page number to retrieve. Default is 1.
- Name
per_page
- Type
- integer
- Description
Number of items per page. Default is 10, maximum is 100.
curl https://app.offerteadviseur.nl/api/categories \
-H "Authorization: Bearer eyJ..." \
-H "Accept: application/json" \
-G \
-d page=2 \
-d per_page=20
Understanding the response
The paginated response includes:
Links object
first
: URL for the first pagelast
: URL for the last pageprev
: URL for the previous page (null if on first page)next
: URL for the next page (null if on last page)
Meta object
current_page
: The current page numberfrom
: The starting result numberlast_page
: The last page numberpath
: The base URL pathper_page
: Number of items per pageto
: The ending result numbertotal
: Total number of items across all pages
Endpoints supporting pagination
The following endpoints support pagination:
Each endpoint's documentation includes specific examples of how pagination works for that resource.