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.

POST/hotels

Mandatory Fields

  • country or geoLocationFilter

Optional Fields

  • body

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
bodybodyhotelsearchOptionalnone

Responses

StatusMeaningDescriptionSchema
200OKSuccessschemahotelsresp
400Bad RequestBad Request
401UnauthorizedAuthentication Failed or Account validity expired
500Internal Server ErrorInternal server error

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.