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
| Parameter | Type | Description |
|---|---|---|
criteria | object | Filter criteria (see below) |
settings.connectionCodes | array | Provider 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
- JavaScript
- Python
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"]
}
}'
async function listBookings(criteria = {}) {
const response = await fetch(
'https://api.bundleport.com/connect/hotels/v1/bookinglist',
{
method: 'POST',
headers: {
'Authorization': 'ApiKey YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
criteria: {
typeSearch: 'BOOKING_LIST_CRITERIA_TYPE_DATES',
dates: {
dateType: 'BOOKING_LIST_CRITERIA_DATE_TYPE_ARRIVAL',
start: criteria.startDate || '2025-06-01T00:00:00Z',
end: criteria.endDate || '2025-06-30T00:00:00Z',
},
},
settings: {
connectionCodes: ['testb-hbds-1876'],
},
}),
}
);
return await response.json();
}
import requests
def list_bookings(criteria=None):
url = "https://api.bundleport.com/connect/hotels/v1/bookinglist"
headers = {
"Authorization": "ApiKey YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"criteria": {
"typeSearch": "BOOKING_LIST_CRITERIA_TYPE_DATES",
"dates": {
"dateType": "BOOKING_LIST_CRITERIA_DATE_TYPE_ARRIVAL",
"start": criteria.get("startDate") if criteria else "2025-06-01T00:00:00Z",
"end": criteria.get("endDate") if criteria else "2025-06-30T00:00:00Z",
}
},
"settings": {
"connectionCodes": ["testb-hbds-1876"]
}
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
Next Steps
- Retrieve Booking - Get detailed booking information
- Cancel Booking - Cancel a reservation
- Webhooks - Receive real-time booking updates