Plan a trip
All trips start with the a traveller or agent working on behalf of a traveller requesting a trip from a specific location, to a specific location at a specific time - or as soon as possible.
Plan a trip
- Get the trip origin’s Place ID
Using the Locations API, find the Place ID for both the origin destination of the desired trip.
A Place ID is a long string of characters. They are used in the Karhoo system to canonically represent locations. For instance Place ID: Eh5DaGFyaW5nIENyb3NzIFJvYWQsIExvbmRvbiwgVUs
currently represents “Charing Cross Road, London, UK”.
- Get the destination’s Place ID
Use the approach as above to find the Place Id desired as the destination for the trip.
Related tasks
As part of the trip planning process, the user might need to complete additional, related tasks.
Get location details
To get location details for a place ID, call /locations/address-details
with Place ID.
Get location using a partial place name
To get autocomplete suggestions for a given string or a position defined by latitude/ longitude, call /locations/address-autocomplete
with either:
query
: a name of a place, which is used to match against, orposition
: a latitude/longitude to autocomplete
Reverse-geocoding a latitude/longitude position
Reverse geocoding is the process of coding of a point location (latitude, longitude) to a human-readable address or place name.
To reverse-geocode a Place ID, call /locations/reverse-geocode
with the parameters:
latitude
: The latitude of the location to reverse-geocode, in decimal degrees, in the range [-90.0 - +90.0]longitude
: The longitude of the location to reverse-geocode, in decimal degrees, in the range [-180.0 - +180.0]
Reference
Service | API reference | Errors reference |
---|---|---|
Locations | Locations | Locations Errors |
Troubleshooting
Some potential errors you might encounter are:
Error | Solution |
---|---|
Invalid request payload | Check the request body for invalid parameter names or values. |
Could not get address | Check the address details you provided. |
Could not autocomplete supplied address | To minimise the autocomplete possibilities, at least 3 characters are required for a place name. Also check that the entered partial place name is valid. |
Updated about 5 years ago