Pagination
List endpoints return one page at a time.
Query parameters
| Parameter | Default | Notes |
|---|---|---|
page | 1 | 1-based page number. |
per_page | 25 | Items per page. Capped at 100. The trips list uses a fixed server page size of 20. |
Request
curl "https://app.destination.dev/api/v1/bookings\
?page=2&per_page=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Reading the response
The page of results is in data; paging information is in meta.pagination.
| Field | Meaning |
|---|---|
count | Number of items on this page. |
total | Total matching items. May be absent when a total isn't available. |
total_pages | Total pages (present when total is known). |
has_more | Whether another page follows. |
Response
{
"data": [ /* ... up to per_page items ... */ ],
"meta": {
"request_id": "req_1a2b3c4d5e6f7a8b",
"pagination": {
"page": 2,
"per_page": 50,
"count": 50,
"total": 137,
"total_pages": 3,
"has_more": true
}
}
}
Loop until
has_more is false rather than assuming a fixed
page count — it works whether or not total is present.