Skip to main content

List Bookings

The list endpoint allows you to query bookings with filters, sorting, and pagination. Useful for reconciliation, reporting, and customer service.

Endpoint

GET /hotels/v1/bookings

Request

Query Parameters

ParameterTypeDescription
filtersobjectFilter criteria (see below)
paginationobjectPagination settings
sortobjectSort order

Filters

{
"filters": {
"status": ["CONFIRMED", "PENDING"],
"dateRange": {
"from": "2025-06-01",
"to": "2025-06-30"
},
"checkInRange": {
"from": "2025-06-15",
"to": "2025-06-20"
},
"clientReference": "BOOKING-2025-001",
"providerReference": "SUPPLIER-12345",
"hotelCodes": ["12345", "67890"]
}
}

Pagination

{
"pagination": {
"page": 1,
"pageSize": 20
}
}

Sort

{
"sort": {
"field": "createdAt",
"order": "DESC"
}
}

Response

Success Response

{
"bookings": [
{
"id": "BK-987654321",
"status": "CONFIRMED",
"reference": {
"bookingID": "BK-987654321",
"clientReference": "BOOKING-2025-001"
},
"hotel": {
"code": "12345",
"name": "Example Hotel Barcelona"
},
"stay": {
"checkIn": "2025-06-15",
"checkOut": "2025-06-17"
},
"price": {
"currency": "EUR",
"net": 150.00
},
"createdAt": "2025-06-01T10:30:00Z"
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 150,
"totalPages": 8
}
}

Use Cases

1. Reconciliation

// Get all confirmed bookings for a date range
const bookings = await listBookings({
filters: {
status: ['CONFIRMED'],
dateRange: {
from: '2025-06-01',
to: '2025-06-30',
},
},
pagination: {
page: 1,
pageSize: 100,
},
});

// Reconcile with your internal records
bookings.bookings.forEach(booking => {
reconcileBooking(booking);
});

2. Customer Service

// Find booking by client reference
const bookings = await listBookings({
filters: {
clientReference: customerProvidedReference,
},
});

if (bookings.bookings.length > 0) {
const booking = bookings.bookings[0];
// Display booking details to customer service agent
displayBookingDetails(booking);
}

3. Reporting

// Get bookings for reporting
const allBookings = [];
let page = 1;
let hasMore = true;

while (hasMore) {
const result = await listBookings({
filters: {
dateRange: {
from: startDate,
to: endDate,
},
},
pagination: {
page,
pageSize: 100,
},
});

allBookings.push(...result.bookings);
hasMore = page < result.pagination.totalPages;
page++;
}

// Generate report
generateReport(allBookings);

Code Examples

curl -X GET "https://api.bundleport.com/hotels/v1/bookings?filters[status][]=CONFIRMED&filters[dateRange][from]=2025-06-01&filters[dateRange][to]=2025-06-30&pagination[page]=1&pagination[pageSize]=20" \
-H "Authorization: ApiKey YOUR_API_KEY"

Next Steps