Location Auto-Completion and Geo Codes
NOTE:This guide is intended for API clients, particularly those seeking a solution locations auto-complete for retrieving Geolocations (Latitude & Longitude) for locations around the world.
Overview
To perform a Geo Location based search for a destination, it's essential to have accurate Geo Location information in place.
While there are multiple Location and Geo-Coding APIs available in the market (i.e. Google Maps API article).
HSP provides a convenient solution for clients - by offering a dedicated API for location services.
When an end customer searches for a location name (i.e. New York), it's crucial to have the necessary details for initiating a Search Hotels request to HSP. This information should include the latitude, longitude, and a radius in meters specific to the chosen location.
The locations service offers couple of solutions :
API Request | Description | Used for | Postman API Example |
|---|---|---|---|
Get Locations | The request accepts free-text input of locations (e.g., "Rome" / "New York"), | - Locations Auto completion.
| |
Country by IP | The request accepts user's IP Address (IPv4), | - Identifying end-customer's origin country by their IP. | |
Country Code | The request accepts country code (ISO country code), | -Identifying the country name by country-code. |

GetLocations - Example
Updated 8 days ago