Travel API doesn't work for cities outside of the US - why? - api

I have been trying out the travel API from sabre, been testing APIs (for example InstaFlights Search or destination finder) and it works only for US cities (departure and destination). I've been testing them on sabres website (so this has nothing to do with my code). I don't assume that sabre API is only for US domestic flights as that would be too strange, so does anyone know why I'm getting 404 when I try to put a non-US city as departure or destination?
Thanks a lot!
EDIT:
Random international flights options do work and some don't.
For example MUC-LHR ( Munich to London) works when I change the point of sale country to DE but doesn't work for MUC - JFK for example.

Are you hitting CERT or PROD? Not all of Sabre content is available in CERT, so that might be why you're seeing such odd results.

Related

On-Demand Flight Status | Gate Information not working

using the Java SDK, trying to use the On-Demand Flight Status API will result in following error, if a Gate is specified:
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $[0].flightPoints[0].departure.gate
From the documentation I assume that gate should be a JSONObject with the mainGate attribute, but apparently it has been encoded as a JSONArray in the SDK.
I would be grateful about some feedback on this. Maybe I am doing something wrong?
Thanks!
P.S.
If I may add some suggestions:
Would it be possible to make segments.partnership return the flight number of the operating carrier, if the search is done with a codeshare flight? Currently it seems to just return 0, if a codeshare flight number is entered. (e.g. searching for A37136 will return OA0, instead of OA136). Also, it would be great if segments.partnership was to return all codeshare flight numbers for particular flight, and not only one.
The possibility to access fare rules from Flight Offers would be great as well. I understand that displaying fares between two cities is a feature of the Enterprise API (which I probably am not eligible to use), but it would be great to be able to see data, such as Travel and Sales restrictions like these:
VALID FOR TRAVEL COMMENCING ON/AFTER 20SEP 21 AND ON/BEFORE 10MAR 22.
TICKETS MUST BE ISSUED ON/BEFORE 29SEP 21.
As always, thank you for your work!
Below you can find the answers on the topics mentioned in your questions:
Java SDK - gate info not working
Thanks for the report, we've opened the issue on GitHub where you can track its status.
Flight Fare rules
The fare rules can be found for each flight with the Flight Offers Price API where you would have to add the query parameter include=detailed-fare-rules your URL, such as:
https://test.api.amadeus.com/v1/shopping/flight-offers/pricing?include=detailed-fare-rules
Operating carrier in codeshare flight
Indeed with the specific flight doesn't return properly the operating carrier flight number, however, we tested it with other codeshare flights and it worked fine. It seems that the issue is coming directly from the providers and the data they share.
Return all codeshare flight numbers
This is not possible from the legal point of view, as it means it would expose the partnerships and private business between the airlines.

api that gives all needed pieces for a car from its vin number

I'm developing an application and I'm looking for an api that gives all car parts from its vin number
I know it's not going to be for free and it's ok
any suggestions please ? thank you
Don't know if you still need it but in my project I used the United States Department of Transportation's API. It gives informations about the car and it's free to use.
It's more centered around American's Specifications, but there is also a call for Canadian Specifications.
You can also choose the data format you want between XML, CSV and JSON !

Google Geocoding API Returning Wrong Zip/City

The address I am attempting to geocode is 1030 Pops Way, Bogart, GA 30622. Google seems to think this address is located in Watkinsville, GA 30677 and so returns Watkinsville and 30677. This is incorrect. Literally every other site listing addresses, including USPS, locates this address in Bogart 30622.
This is not the only instance of Google returning incorrect zip codes I have come across.
https://maps.googleapis.com/maps/api/geocode/json?address=1030+pops+way+30622+bogart+ga&key=API-KEY
It seems to be a data issue on Google side.
Let's check the 'Pops Way, Bogart, GA 30622' request in Geocoder tool:
https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/utils/geocoder/#q%3DPops%2520Way%252C%2520Bogart%252C%2520GA%252030622
As you can see the result is a route with a postal code 30622 as shown in my screenshot
However if I click the building with number 1030 on this street the postal code changes to 30677
https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/utils/geocoder/#q%3D33.901296%252C-83.559744
as shown in the following screenshot
I can suggest reporting a wrong postal code in address to Google data team as explained in the documentation
https://support.google.com/maps/answer/3094088
You can use this direct link
https://www.google.com/maps/#33.9017628,-83.5603702,18z/data=!10m1!1e1!12b1?rapsrc=apiv3
I hope this helps!

How to validate a location address in form?

I want to validate that the postal address filled in by a user is correct.
Assuming that we have the fields street, street_number, postal_code, city and country
How can show errors when the user, types in that his country is France and is city is New York?
or
How can I detect that a postal code doesn't correspond to the city?
Is there a strategy to address this issue with Ruby On Rails or shall I just trust the user entries ?
There are several companies that publish US ZIP code directories, typically not terribly expensive, and some even come with lat/lon data. This is the most common way of validating city and state in the US or North America. Worldwide postal codes to country and city is likely to be a harder problem, or at least a more expensive one.
Another approach would be to use the Google Maps API, perhaps in conjunction with the data you can get from location-aware browsers (all modern ones). To be honest, it's been a while since I have used the API, but seem to recall you can get pretty detailed information given a lat/lon. Google now charges for high use of the Maps API, but if your site has even moderate traffic, you're probably still in the free zone.
At some level, you'll have to trust users. I remember a while back we found anomalies in user reported zipcodes in our database -- seemed like everyone lived in Beverly Hills, CA. This was around 2000, when the original version of the TV show "90210" was still around -- that's the zipcode :-).
Have you considered just a jQuery plugin to verify addresses for you? It's free for many users, up to 250 lookups/mo, and is always current (no need for you to maintain a database).
Incidentally, I work at SmartyStreets. There's also a ZIP code API to look up if cities match ZIP codes and vice-versa. Either way, we've put a lot of effort into making the user experience positive, even when the address they type isn't totally valid.

area locations nearby using reverse geocoding provide different results

I am using googles reverse geocoding to lookup sub localities and neighbourhoods.
Both of the below coordinates are extremely close to one another and are both within victoria island in Nigeria however only the first reference shows the neighbourhood.
Shows vitoria island in the response under neighbourhoods
http://maps.googleapis.com/maps/api/geocode/json?latlng=6.428291386098148,3.4191928832085523&sensor=false
Doesn't show victoria island in the response under neighbourhoods from the first address components
http://maps.googleapis.com/maps/api/geocode/json?latlng=6.427779639540112,3.420051190093318&sensor=false
Can anyone shed some light on this? Is there a way to get better results? I have tried yahoo place finder but no luck there either.