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

POST /connect/hotels/v1/bookinglist

Request

Request Body Parameters

ParameterTypeDescription
criteriaobjectFilter criteria (see below)
settings.connectionCodesarrayProvider connection codes (required)

Example Request

{
"criteria": {
"typeSearch": "BOOKING_LIST_CRITERIA_TYPE_DATES",
"dates": {
"dateType": "BOOKING_LIST_CRITERIA_DATE_TYPE_ARRIVAL",
"start": "2025-06-01T00:00:00Z",
"end": "2025-06-30T00:00:00Z"
}
},
"settings": {
"connectionCodes": ["testb-hbds-1876"]
}
}

Search by Booking ID

{
"criteria": {
"typeSearch": "BOOKING_LIST_CRITERIA_TYPE_BOOKING_ID",
"bookingID": "BK-987654321"
},
"settings": {
"connectionCodes": ["testb-hbds-1876"]
}
}

Response

Success Response

{
"bookings": [
{
"bookingID": "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 bookings for a date range
const bookings = await listBookings({
criteria: {
typeSearch: 'BOOKING_LIST_CRITERIA_TYPE_DATES',
dates: {
dateType: 'BOOKING_LIST_CRITERIA_DATE_TYPE_ARRIVAL',
start: '2025-06-01T00:00:00Z',
end: '2025-06-30T00:00:00Z',
},
},
settings: {
connectionCodes: ['testb-hbds-1876'],
},
pageSize: 100,
},
});

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

2. Customer Service

// Find booking by booking ID
const bookings = await listBookings({
criteria: {
typeSearch: 'BOOKING_LIST_CRITERIA_TYPE_BOOKING_ID',
bookingID: customerProvidedBookingId,
},
settings: {
connectionCodes: ['testb-hbds-1876'],
},
});

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 POST https://api.bundleport.com/connect/hotels/v1/bookinglist \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"criteria": {
"typeSearch": "BOOKING_LIST_CRITERIA_TYPE_DATES",
"dates": {
"dateType": "BOOKING_LIST_CRITERIA_DATE_TYPE_ARRIVAL",
"start": "2025-06-01T00:00:00Z",
"end": "2025-06-30T00:00:00Z"
}
},
"settings": {
"connectionCodes": ["testb-hbds-1876"]
}
}'

Next Steps