Pagination
Collection endpoints return paginated results. By default, 30 items are returned per page.
Query parameters
Use the page and itemsPerPage query parameters to control pagination:
- Name
page- Type
- integer
- Description
The page number to retrieve. Defaults to
1.
- Name
itemsPerPage- Type
- integer
- Description
The number of items per page. Defaults to
30.
Example
Request the second page of offers, with 10 items per page.
Request
GET
/api/offers?page=2&itemsPerPage=10curl "https://ferienpass-musterstadt.de/api/offers?page=2&itemsPerPage=10"
Response
[
{
"name": "Klettern im Kletterzentrum",
"alias": "45-klettern-im-kletterzentrum",
"dates": [{ "begin": "2024-07-15T10:00:00+02:00", "end": "2024-07-15T12:00:00+02:00" }],
"fee": 800
},
{
"name": "Töpfern für Anfänger",
"alias": "46-toepfern-fuer-anfaenger"
}
]
Link header
The API includes a Link response header with rel values for navigating between pages — following the RFC 5988 web linking specification.
Link: <https://ferienpass-musterstadt.de/api/offers?page=1>; rel="first",
<https://ferienpass-musterstadt.de/api/offers?page=1>; rel="prev",
<https://ferienpass-musterstadt.de/api/offers?page=3>; rel="next",
<https://ferienpass-musterstadt.de/api/offers?page=5>; rel="last"
- Name
first- Type
- link
- Description
URL of the first page.
- Name
prev- Type
- link
- Description
URL of the previous page. Absent on the first page.
- Name
next- Type
- link
- Description
URL of the next page. Absent on the last page.
- Name
last- Type
- link
- Description
URL of the last page.