Sabre Car Rental API - One-way rental availability by City / Zip / Poi - sabre

I'm using the Ground Transportation SOAP API to fetch car rental availability by city/zip/poi using VehLocationFinderLLSRQ. It returns a list of locations and available vehicles, along with the total price. This works fine for regular rentals. However, I can't figure out a way to search for a one-way rental (by specifying a return location).
I'm aware of VehLocationListLLSRQ, which lets you specify a Pickup and Return location, but it requires a location code. I don't have a location code, but only a city/zip or poi.
For example, I'm interested in one-way rentals from "Copley Square, Boston(MA) to South Beach, Miami(FL)". What's the best way to do this?

According to the Request Design Documentation, you can specify whether a location is or not a drop-off location. Also, it states that the <LocationDetails> element has a repeat factor of 0 or 2.
So based on that information and the example request, I would consider trying something like this:
<VehLocationFinderRQ Version="2.2.0">
<VehAvailRQCore>
<LocationDetails DropOff="false">
<Address>
<CityName>SOUTHLAKE</CityName>
<StateCountyProv StateCode="TX" />
<StreetNmbr>3150 SABRE DRIVE</StreetNmbr>
</Address>
</LocationDetails>
<LocationDetails DropOff="true">
<Address>
<CityName>DALLAS</CityName>
<StateCountyProv StateCode="TX" />
<StreetNmbr>MAIN ST</StreetNmbr>
</Address>
</LocationDetails>
<VehRentalCore PickUpDateTime="12-22T09:00" ReturnDateTime="12-29T11:00" />
</VehAvailRQCore>
</VehLocationFinderRQ>

Related

Empty Results from Here API for the sample zipcodes

When I do the GET Request to the here API with the below zip codes I am getting an empty list. But When I google these zip codes, I can see that they are valid.
Here is the GET Request URL: https://geocode.search.hereapi.com/v1/geocode?qq=postalCode=[Insert-zip-code];country=USA&apiKey=[Insert-API-Key]
Below are the fallowing Zip Codes:
75046
34988
68902
45258
19486
88102
32245
28603
68501
93403
68602
91365
Try with https://geocode.search.hereapi.com/v1/geocode?q=postalCode=zip_code+USA&apiKey=your_api_key
Notice that there is only one q.
The above will work, but in some cases it will give you results not only from the United States.
Keep in mind what the API documentation says for this service:
Address lookup by postal code (SGP, IRL)
(...) This feature is available for these two countries only.
It's only for Ireland and Singapore.
There is an alternative for the United States (and Netherlands), but it requires the zip+4 code.
What is a Zip+4 Code?
A ZIP+4 code uses the basic five-digit code plus four additional
digits to identify a geographic segment within the five-digit delivery
area, such as a city block, a group of apartments, an individual
high-volume receiver of mail, a post office box, or a specific
delivery route
Example: https://geocode.search.hereapi.com/v1/geocode?qq=postalCode=60606-1506&apiKey=your_api_key
Notice that there are two q's.

HERE API: Toll cost is not optimized

I'm exploring HERE API in order to evaluate usefulness to our application. My interest is focused on estimated truck transport cost (toll, vehicle, driver). I'm facing with a problem in generating optimized route between 2 points: from 50.893017,20.615645 to 52.055324,21.010707. Driver cost set to 10, vehicle cost set to 1.
And when I'm using https://fleet.ls.hereapi.com/2/calculateroute.json I get the distance in total 211km with 260.17 PLN cost (including 0 toll cost)
When I'm using https://tce.cit.api.here.com/2/calculateroute.json I get distance 159km with 221.28 PLN (including 38.55 PLN toll cost).
As you can see first API didn't returned cost optimized route. Moreover it looks like the first API is trying to omit toll gates, while this better than go around.
Am I missing something? Why there is so much difference? Parameters for both queries looks similar.
First api parameters (excluding api keys):
jsonAttributes:41
waypoint0:50.893017,20.615645
waypoint1:52.055324,21.010707
detail:1
routelegattributes:li
routeattributes:gr
maneuverattributes:none
linkattributes:none,rt,fl
legattributes:none,li,sm
currency:PLN
departure:
tollVehicleType:3
trailerType:0
vehicleNumberAxles:2
trailerNumberAxles:0
hybrid:0
emissionType:3
fuelType:petrol
trailerHeight:0
vehicleWeight:40t
disabledEquipped:0
hov:0
passengersCount:2
tiresCount:4
commercial:0
heightAbove1stAxle:1m
width:1.8
length:4.41
mode:fastest;truck;traffic:disabled
alternatives:2
driver_cost:10
vehicle_cost:1
Second api parameters (excluding api keys):
jsonAttributes:41
waypoint0:50.893017,20.615645
waypoint1:52.055324,21.010707
detail:1
routelegattributes:li
routeattributes:gr
maneuverattributes:none
linkattributes:none,rt,fl
legattributes:none,li,sm
currency:PLN
departure:
tollVehicleType:3
trailerType:0
vehicleNumberAxles:2
trailerNumberAxles:0
hybrid:0
emissionType:3
fuelType:petrol
trailerHeight:0
vehicleWeight:40t
disabledEquipped:0
hov:0
passengersCount:2
tiresCount:4
commercial:0
heightAbove1stAxle:1m
width:1.8
length:4.41
mode:fastest;truck;traffic:disabled
alternatives:2
driver_cost:10
vehicle_cost:1
Please don't use in URL request nor the domain name tce.cit.api.here.com nor tce.api.here.com or some old parameter names also for fleet.ls.hereapi.com .
This tce.api.here.com is legacy and will be sometimes wrong calculate a toll.
Read please this documentation for tollPass parameter:
Comma separated list of owned passes: Senior_Pass, transponder,
Annual, Nr_of_Days, Nr_of_Months, SunPass, E-Z Pass (last 2 are
examples for real toll transponders). Allows traversal of
'transponder-only' toll booths and allows cost free traversal of
certain toll sections.
Some toll booths and toll sections are allowed to use only by driver who has some toll pass e.g. tollPass=transponder otherwise a driver have to avoid these booths/toll sections to use more long way.
if you try to use e.g. tollPass=transponder parameter for request to fleet.ls.hereapi.com then you will see using toll section.

How to get the list of bag options from a journey without recordlocator

We need to see if Ryan Air makes available the cabin bag option before booking.
Therefore what is the action verb we can use to get this list with flight information (itinerary, segment) ?
Thanks :)
Kind regards
It called "BrandedFares" attribute on the Sabre side. With BrandedFares option enabled, you get 1 basic price with its extra prices (cabin bag, meal, etc.).
If you're using BargainFinderMax operation to search and get flights, you have to set BrandedFareIndicators attribute as true, like this:
<TravelerInfoSummary>
<PriceRequestInformation>
<TPA_Extensions>
<BrandedFareIndicators MultipleBrandedFares="true"/>
</TPA_Extensions>
</PriceRequestInformation>
</TravelerInfoSummary>
And also, your PCC also have to be available and has access to get BrandedFares, you need to discuss it with your Sabre consultant.
Regards.

How can reserve Air Seats for all segments in a given PNR?

I am planning to use the <AirSeatRQ> request using Sabre's SOAP API, but according to the documentation, you have to request a seat assignment for each passenger on each segment with the user's preference.
Something like this according to the example on Dev Studio:
<AirSeatRQ ReturnHostCommand="false" TimeStamp="2011-10-27T15:30:00-06:00" Version="2.0.0">
<!--Repeat Factor=0-->
<Seats>
<Seat BoardingPass="true" ChangeOfGauge="true" NameNumber="1.1" Number="21A" Preference="AN" SegmentNumber="1"/>
</Seats>
</AirSeatRQ>
Also, according to the request documentation, the repeat factor for the <Seats> request is zero. Does that mean that if I want to assign seats for all passengers on all segments do I have to send several requests?
Ideally, I would like to have the seats for all passengers in all segments automatically assigned after reading the PNR. Is that possible through Web Services?
Checking the <PassengerDetailsRQ> XML Schema definition, an <AirSeatRQ> can be sent along. I guess you can perform a standalone <AirSeatRQ> request, but bundling it with the passenger details is easier and save us from making extra requests to Sabre's API.
You have to send a <Seat\> request for each passenger in each segment of the itinerary. This is a working example I did for a two legs itinerary, each leg consisting of two segments for two adults:
I'm omitting most of the passenger details properties and focusing on the AirSeat element:
<PassengerDetailsRQ Version="2.3.0">
<PriceQuoteInfo HaltOnError="true"></PriceQuoteInfo>
<SpecialReqDetails>
<AddRemarkRQ>
<RemarkInfo>
<Remark Code="H" Type="General">
<Text>THANK YOU FOR BOOKING MAURICIO CUENCA AIRLINES</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
<AirSeatRQ>
<Seats>
<Seat NameNumber="1.1" Preference="AN" SegmentNumber="1"/>
<Seat NameNumber="1.2" Preference="AN" SegmentNumber="2"/>
<Seat NameNumber="1.1" Preference="AN" SegmentNumber="3"/>
<Seat NameNumber="1.2" Preference="AN" SegmentNumber="4"/>
</Seats>
</AirSeatRQ>
<SpecialServiceRQ HaltOnError="true">
<SpecialServiceInfo></SpecialServiceInfo>
</SpecialServiceRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ HaltOnError="true">
<AgencyInfo></AgencyInfo>
<CustomerInfo></CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
This way, right after the PNR is created, all seats for all passengers in every segment are already assigned and there is no need for further requests asking for seat assignments.
that seems to be the case.
Testing multiple <Seat> elements inside <Seats> returns a schema validation error. Same when using multiple <Seats> elements.
Looks like the only option right now is to send multiple requests, one for each passenger on each segment.

Correct address format to get the most accurate results from google GeoCoding API

Is there any standard format to supply the address string to Google GeoCoding API to get the most accurate results on map.
For Eg. following query not giving correct result.
http://maps.googleapis.com/maps/api/geocode/xml?address=bloom,Bloomfield,CT,06002,USA&sensor=false
Thanks
Mandeep
I believe the suggested format is:
House Number, Street Direction, Street Name, Street Suffix, City, State, Zip, Country
The results get less specific the less information you can supply, obviously.
In your sample, the geocoder is searching for a street named 'bloom', of which there are similar matches in OH instead of CT. Removing 'bloom' from the query and then searching returns Bloomfield, CT.
Definition of Google address search:
address - The street address that you want to geocode, in the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided.
https://developers.google.com/maps/documentation/geocoding/#geocoding
How should I format my geocoder queries to maximise the number of successful requests?
The geocoder is designed to map street addresses to geographical coordinates. We therefore recommend that you format geocoder requests in accordance with the following guidelines to maximise the likelihood of a successful query:
Specify addresses in accordance with the format used by the national postal service of the country concerned.
Do not specify additional address elements such as business names, unit numbers, floor numbers, or suite numbers that are not included in the address as defined by the postal service of the country concerned.
Use the street number of a premise in preference to the building name where possible.
Use street number addressing in preference to specifying cross streets where possible.
Do not provide 'hints' such as nearby landmarks.
https://developers.google.com/maps/faq#geocoder_queryformat
I found the answer incomplete and it lacked a source.
Look here: https://developers.google.com/places/documentation/autocomplete#place_autocomplete_responses
The maps autocompletion API from google returns a much simpler format: "Street address, City, Country"
Now you can use a string like that to search for an address and it should lead to one exact result.
In addition if you use the autocompletion API you will get a unique identifier too which can be used for further detail requests.
The format of the street address greatly depends on the location where you actually are.
In the US "House number, street direction, street name, street suffix" might make sense, in most of Europe it will not lead to successful query.
Addresses in most of EU are different (often "Streetname number suffix") like "Kumpelstraat 25A","Psolevcu 331/26b") and I guess we'd be surprised if we look at some eastern countries.
So if you bind your code to a single area (US, most of EU) you might be good hardcoding the format.
If you want to have a more flexible system you either need to find out propper formating for your target audience or query one of googles APIs to automatically get a proper string.
The one I linked is very good but requires an API key with a free request limit per day.
I stumbled upon this question and found a solution that worked for me:
I think the answer can be found by using component filtering, look at:
https://developers.google.com/maps/documentation/geocoding/#ComponentFiltering
An example in Javascript:
var request = require('request');
var url = "https://maps.googleapis.com/maps/api/geocode/json?" +
"address=Herengracht 180" +
"&components=postal_code:1016 BR|country:NL" +
"&sensor=false";
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
else {
console.log('error', error);
}
});
No need to avoid apartment units. This works:
https://maps.googleapis.com/maps/api/geocode/xml?address=14202+N+42nd+St+Unit+301+33613
"Apt", "Room", and "Suite" work as well
They all return 301 as subpremise and are shown in "formatted_address" as "#301."
Paul sends...
I found that official country codes like "US", "DE", "FR" do not work well. Replacing them with the full country name gives much better results for me.
I did not find a source where that is stated.

Resources