Using Geo APIs with Get Vehicle Availability
Geo Auto Complete API
The Geo Auto Complete API is a RESTful service that can be used to obtain latitude and longitude values during the GetVehAvail process.
How to use
Required Input Parameters:
- Query - Used to input search data
- ClientID - Used to input the travel agency’s Pseudo City Code (PCC)
- Category - Used to describe the type of query above.
GetVehAvailRQ Terminology
- POI – Point of Interest
- RAIL – Rail station name
- CITY – City name
GetVehAvailRQ
To find the latitude and longitude of the Eiffel Tower, which is a point of interest (POI), the request would look like the following:
Request:
Response:
{ "responseHeader":{ "status":0, "QTime":2}, "grouped":{ "category:POI":{ "matches":6, "doclist":{"numFound":4,"start":0,"docs":[ { "name":"Eiffel Tower", "country":"FR", "countryName":"France", "category":"POI:Historical Monument", "id":"801890088", "dataset":"POI", "datasource":"POI", "confidenceFactor":"1", "latitude":"48.8586", "longitude":"2.29398", "ranking":0}, { "name":"Eiffel Tower", "city":"Paris", "country":"FR", "countryName":"France", "stateName":"le-De-France", "state":"le-De-France", "category":"POI:HISTORICAL MONUMENT/CEMETERY:HISTORICAL MONUMENT", "dataset":"POI", "datasource":"POI", "confidenceFactor":"1", "latitude":"48.85793", "longitude":"2.29526", "ranking":0}, { "name":"Eiffel Tower Tour", "city":"Las Vegas", "country":"US", "countryName":"United States Of America", "stateName":"Nevada", "state":"NV", "category":"POI:TOURIST ATTRACTION:TOURIST ATTRACTION", "dataset":"POI", "datasource":"POI", "confidenceFactor":"1", "latitude":"36.11185", "longitude":"-115.17142", "ranking":0}, { "name":"Eiffel Tower Tour", "city":"Uninc Clark County", "country":"US", "countryName":"United States Of America", "stateName":"Nevada", "state":"Nevada", "category":"POI:Tourist Attraction", "id":"19408882", "dataset":"POI", "datasource":"POI", "confidenceFactor":"1", "latitude":"36.11183", "longitude":"-115.1714", "ranking":0}] }}}}
Geo Auto Correct
Geo AutoCorrect is used in conjunction with GetVehAvail to get a successful response in the latitude and longitude for a search point.
Geo AutoCorrect automatically prioritizes the most viewed location to the top. It reviews the response, selects the location that applies, and displays the latitude and longitude in the GetVehAvialRQ.
Since the Geo AutoCorrect response is used in conjunction with GetVehAvail, the rest of the response is ignored.
Geo Search Request API
GeoSearchRQ is used to request information about car rental locations, hotel properties, or airports.
How to use?
The GeoSearchRQ API is used to get latitude and longitude values for use with the GetVehAvailRQ API.
Required Input Parameters:
- Radius - it is used to determine the size of the search area to find the category of information.
- Unit of Measure – it is used in conjunction with GetVehAvail, and the default value is set to MI.
Ensure to select one of the AddressRef features below to determine the Geo point:
AddressRef
- Street
- County
- StateProv
- PostalCode
- CountryCode
- City
Optional Input Parameters:
- Category - the default value is HOTEL.
MaxResults:
It is the limit of number of responses which the user wants, while using GeoSearch for getting latitude or longitude for GetVehAvail the MaxResults can be set to 1.
To achieve MaxResults, refer the below section:
XML Request Structure
<GeoSearchRQ>
<GeoRef Radius=" " UOM=" " MaxResults=" " OffSet=" " Category=" ">
<AddressRef Street=" " City=" " PostalCode=" " County=" " StateProv=" " CountryCode=" "/>
</GeoRef>
</GeoSearchRQ>
XML Request Definitions
<GeoSearchRQ>
This field is the beginning of the request for GeoSearch.
<GeoRef Radius=" " UOM=" " MaxResults=" " OffSet=" " Category=" ">
The Geo Reference element and attributes are used to describe the number of miles or kilometers radius to search around the reference point, the maximum number of results, and the type of information to be returned.
Name |
Description |
Radius=" " |
|
UOM=" " |
|
MaxResults=" " |
|
Category=" " |
CAR - Car rental locations. HOTEL - Hotel property locations. AIR – Airport locations.
|
Street=" " |
|
City=" " |
|
OffSet=" " | The OffSet attribute is an optional field and is used for internal Sabre use only. Do not use if you are a third-party Developer. |
PostalCode=" " | The Postal Code attribute is an optional field between 1-50 characters, but is usually 5-11 alpha-numeric |
County=" " |
|
StateProv=" " |
|
CountryCode=" " |
|
Address Reference
- The Address Reference element is an optional field, but it is the most used element when searching for car rental locations except for CountryCode.
- The more attributes which are used, the more accurate the location information is returned.
Sample Request:
<GeoSearchRQ>
<GeoRef Radius="10" UOM="MI" MaxResults="1" Category="CAR">
<AddressRef Street="3150 Sabre Drive" City="Southlake" PostalCode="76092" County=" " StateProv="TX" CountryCode="US"/>
</GeoRef>
</GeoSearchRQ>
Sample Response:
<GeoSearchRS"> <ApplicationResults status="Complete""> <Success timeStamp="2019-01-16T15:54:26.364-06:00"/> <ApplicationResults> <GeoSearchResults Radius="10.0" UOM="MI" Category="CAR" Latitude="32.982263"
Longitude="-97.161872" MaxSearchResults="12" OffSet="1">
<GeoSearchResult Distance="5.39" Direction="SW" Latitude="32.934204"
Longitude="-97.235146">
<Name>DFWW055 KELLER</Name> <Id>ETDFWW055</Id> <Street>830 KELLER PKWY</Street> <Zip>76248-2400</Zip> <City>KELLER</City> <State>TX</State> <Country>US</Country> <ConfidenceFactor>1</ConfidenceFactor> <Attribute Name="vendor" Value="ET"/> <GeoSearchResult> <GeoSearchResults> <GeoSearchRS>
GeoSearch Response
GeoSearch is used in conjunction with GetVehAvail to display the latitude and longitude of the search point and NOT for the latitude and longitude of the rental location.
<GeoSearchRS>
This field is the beginning of a request for GeoSearch response.
<ApplicationResults status="Complete">
The Application results status attribute must be Complete.
If application is Complete skip directly to GeoSearchResults latitude and longitude.
<GeoSearchResults Radius="10.0" UOM="MI" Category="CAR" Latitude="32.982263" Longitude="-97.161872" MaxSearchResults="12" OffSet="1">
For the purpose of using GeoSearchResults in conjunction with GetVehAvail, use the latitude and longitude.
- Do NOT use the latitude and longitude from GeoSearchResult.
- Do use the latitude and longitude from GeoSearchResults.
Note:
- The S at the end of GeoSearchResults marks the difference between GeoSearchResult. For example, the rest of the response is ignored.