Test Hotels
Tip
It can be difficult to find the right inventory to repeatedly and reliably simulate specific scenarios that are valuable to test before you release your product or a new feature.
A few examples:
How do you find and test a rate that either expires or gets booked by someone else?
How do I make sure I'm displaying all the required information to customers on a booking confirmation?
How do you find and book a rate that accepts loyalty programme numbers when booking?
This is where Test Hotels are helpful.
Accessing Test Hotels via the Stays API
Tip
To find test hotels, you must search with specific coordinates using our Search for accommodation endpoint.
The coordinates are: -24.38, -128.32
An example request that will return test hotels is provided in these examples:
duffel.stays.search({rooms: 1,location: {radius: 2,geographic_coordinates: {latitude: -24.38,longitude: -128.32}},check_out_date: "2023-09-07",check_in_date: "2023-09-04",adults: 2})
Accessing Test Hotels via the Dashboard
Test Hotels are also available as a quick search option in the Dashboard.
Our implementation is a good point of reference for working with Test Hotels.
Test hotels search via the dashboard
Keep in mind that this is only available on test mode.
Available test scenarios
Each test hotel will have a name and description which details which scenario or scenarios the hotel tests.
In most cases the hotel will contain multiple rooms, each of which will contain one or more rates which will fulfil a specific scenario.
For example, under the "Duffel Test Hotel", there may be a "Successful Booking with Balance" room which will contain a rate that can successfully be booked using balance, or there may be rate under a "Rate Unavailable at Booking" room, which will fail with a "Rate Unavailable" error at time of booking.
Something missing?
We want your development and testing to be as reliable as possible.
Is there another test scenario you'd like to see on this list? Let us know at help@duffel.com