POST/hotels

Search Hotels

This API call retrieves a list of all hotels available in the RatesAPI database for rate retrieval. If a hotel you wish to retrieve rate for is not listed, please send the request using POST /Hotelmaprequest endpoint. We will make efforts to add the hotel to our database within 24 to 72 business hours.
  • hotelname: The name of the hotel.
  • city: The name of the city where the hotel is located.
  • state: The name of the state where the hotel is located.
  • country: The name of the country where the hotel is located.
  • zip: The postal code of the hotel.
  • geoLocationFilter: The geographical location parameters.
    • latitude: The latitude of the area.
    • longitude: The longitude of the area.
    • radius: The radius (in kilometers) around the specified latitude and longitude.
  • pagination: Pagination parameters used to control result set size and navigation.
    • pageNumber: The page number of results to retrieve. Must be a numeric value.
    • pageSize: The number of records per page. Must be a numeric value.
POST/hotels

Mandatory Fields

  • country or geoLocationFilter

Note

Either the country or geoLocationFilter are mandatory parameters. When using geoLocationFilter, all three sub-parameters (latitude, longitude, and radius) are required. All other parameters are optional.

Parameter Details

NameInTypeRequiredDescription
bodybodyRequirednone

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestBad RequestNone
401UnauthorizedAuthentication Failed or Account validity expiredNone
500Internal Server ErrorInternal server errorNone

Example Request

# You can also use wget
curl -X POST /hotels \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "hotelname": "",
  "country": "United States Of America",
  "city": "",
  "state": "",
  "zip": "",
  "keyword": "",
  "pagenumber": 0,
  "pagesize": 0,
  "geolocation": {
    "latitude": "",
    "longitude": "",
    "radius": "5km"
  }
}

Example responses

200 Response
{
  "hotelcode": 0,
  "hotelname": "string",
  "address": "string",
  "city": "string",
  "state": "string",
  "zip": "string",
  "country": "string",
  "starrating": "string",
  "lat": 0,
  "lng": 0
}

Example 1

{
 "hotelname": "Hilton",
 "country": "United States Of America",
 "city": "Las Vegas"
}

Example 2

{
 "geolocation": {
 "latitude": "36.1022356",
 "longitude": "-115.0141588",
 "radius": "5km"
 }
}

Example 3

{
 "country": "United States Of America",
 "pagenumber": 1,
 "pagesize": 10
}

Need Support?

Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.