Skip to main content

Pagination

All list endpoints in the Partner API return paginated responses. This page explains how to navigate through large result sets.

Query parameters​

ParameterTypeDefaultDescription
pageinteger1The page number to return (1-based)
sizeinteger20Number of items per page (max 100)

Example request​

curl -X GET "https://{host}/v1/departures?tripCode=TTSN&page=2&size=10" \
-H "Authorization: Bearer {token}"

Response structure​

Paginated responses include a pagination object alongside the data array:

{
"pagination": {
"page": 2,
"size": 10,
"count": 47,
"noOfPages": 5
},
"results": [
{ "id": "159897TTSN260105", "status": "available", "startDate": "2026-01-05T00:00:00.000Z" },
{ "id": "159897TTSN260202", "status": "available", "startDate": "2026-02-02T00:00:00.000Z" }
],
}
FieldTypeDescription
pageintegerCurrent page number
sizeintegerItems per page (as requested)
noOfPagesinteger20
countinteger100

Iterating through all pages​

To fetch all items, increment page until page > totalPages:

# Page 1
GET /departures?tripCode=TTSN&page=1&size=50

# Page 2
GET /departures?tripCode=TTSN&page=2&size=50

# Continue until page > totalPages from the response

Tips​

  • Don't fetch more than you need. Use filters (dateRangeFrom, status, etc.) to reduce the total result set before paginating.
  • Use a reasonable page size. Larger pages (50–100) reduce the number of requests but increase response time. Smaller pages (10–20) are faster individually but require more calls.
  • Endpoints that support pagination: /trips, /departures, /bookings, /accommodations, /transfers, /activities, /additional-services.