v1

latestOpenAPI 3.0.02026-07-17337.2 KB

Get available hotels

Retrieves a list of available hotels, optionally filtered by location.

get/hotels

Query parameters

locationstring

The city to filter hotels by (e.g., 'New York').

Response

Successfully retrieved hotels.

errorboolean
messagestring

Example response

{
  "data": [
    {
      "id": 1,
      "name": "Grand Hyatt",
      "location": "New York",
      "available_rooms": 10,
      "price_per_night": 250
    }
  ],
  "message": "Successfully retrieved hotels."
}