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.

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.

How it works

When you search for and book the Test Hotel (ID: HH-TEST):

  1. No real booking will be created in our database
  2. No partner credit will be charged
  3. No external supplier API calls will be made
  4. 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:

  1. Search for availability using hotel ID HH-TEST with /v2/availability/search/
  2. Select any rate from the results and create a checkout session with /v2/booking/create/
  3. Complete the booking normally with /v2/booking/complete/
  4. 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-XXXXX to 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: