Get Started
This guide will get you all set up and ready to use the HotelHero API. We'll cover how to get started and how to make your first API request.
Before you can make requests to the HotelHero API, you will need to have an API key. If you don't have one and you'd like to use the API you can contact us.
Authentication
All API requests must include your API key in the header. This key identifies your account and ensures you have access to the HotelHero API. Keep your API key secure and don't share it in publicly accessible areas.
-H "api_key: YOUR_API_KEY"
Making your first API request
After getting your API key, you are ready to make your first call to the HotelHero API. Below, you can see how to send a GET request to the Hotels endpoint to get a list of all available hotels.
curl -X GET https://api.hotelhero.net/v2/hotels \
-H "Content-Type: application/json" \
-H "api_key: YOUR_API_KEY"
Testing with Test Hotel
When integrating your application with the HotelHero API, you can use our special Test Hotel to validate your implementation without creating actual bookings or charging partner credits.
The Test Hotel feature allows you to test the full booking flow in your development environment without impacting real inventory or incurring any charges.
How it works
When you search for and book the Test Hotel (ID: HH-TEST):
- No real booking will be created in our database
- No partner credit will be charged
- No external supplier API calls will be made
- A successful test booking response will be returned with a test booking ID (format:
TEST-XXXXX)
Using Test Hotel in your integration
Follow the standard booking flow, but use hotel ID HH-TEST in your search:
- Search for availability using hotel ID
HH-TESTwith /v2/availability/search/ - Select any rate from the results and create a checkout session with /v2/booking/create/
- Complete the booking normally with /v2/booking/complete/
- You'll receive a test booking response with an ID in the format
TEST-XXXXX
// Step 1: Search for Test Hotel
const searchPayload = {
hotel_id: "HH-TEST", // Use the Test Hotel ID
check_in: "2025-06-01",
check_out: "2025-06-05",
rooms: [
{
adults: 2,
children: []
}
]
};
// Step 2: Create checkout with any rate_id from results
// Step 3: Complete booking normally - no special handling needed
Limitations
- Test bookings are not stored in the database, so you cannot retrieve them later with the booking details endpoint
- Cancellation requests for test bookings will not work
- The booking IDs will always have the format
TEST-XXXXXto easily identify them as test bookings
What's next?
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy: