Update to flight inspiration API: Is only the JSON response changing? Query unchanged? - amadeus

I got an email today about upcoming changes to the Flight Inspiration and Flight Destination searches. It sounds as if the JSON response will now be more granular with results showing specific airports. But I am unclear about whether I have to change my POST requests to use airport codes. Will requests continue to be city codes, or now only airport code requests, or are both acceptable? Again, from the linked blog post, it sounds as if only the response is changing, but API POST requests will remain the same, i.e., city codes. Can someone confirm that?

At this new version, the Flight Inspiration Search and Flight Cheapest Date APIs will still accept city code as input but will return airport codes at the destination field rather than city codes. Thus you won't have to change anything in the query parameter of the APIs.

Related

Amadeus Flight Inspiration Search not working properly

I've already tested the Flight Inspiration Search on test mode and worked fine with the restricted data, so I've decided to move to live with the API. Anyway, it looks like I'm still getting restricted data, because I've got errors (code 500 - not supported origin and destination) for airports like JFK, LTN, etc.
I've changed the base URL and the credentials, so it should retrieve the proper data. Do you have any suggestions for this?
The Flight Inspiration Search API is built on top of a pre-computed cache this is why, even in production, you don't return all possible options. The API computes every day the most trending options based on past searches and bookings and fills the cache, which means that the cache is dynamic. That's why you don't return anything with your defined criteria.
For real-time data you should use the Flight Offers Search API.

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.

Get cryptocurrency twitter, website, and markets from coinmarketcap.com api

I am trying to get the twitter name, website, and markets for any cryptocurrency listed on coinmarketcap.
For example:
https://coinmarketcap.com/currencies/bitcoin shows all of the data that I need but how would I parse the data listed on that page to get the twitter name and website associated with bitcoin?
Don't try to parse the data on that page if you are trying to use it in an application. If you are doing it for a one time data collection then maybe that is OK. There is absolutely no guarantee that the format will remain consistent or that the information will even be there tomorrow.
You should try to find an API that gives you the information that you are looking for. An API is a contract that is expected to be honored and therefore is reliable. A quick look at CoinMarketCap's API doesn't appear to have the info you are looking for but maybe another one exists that does.
If you were to parse the HTML you could write a regex for the specific thing you are looking for. For example if you want to get the website you could write a regex that would pick up the pattern:
Website
the capture group ([^"]+) is the website in this example. You could do something like that for every element you want to get.

Social Tables data model

I've just started looking at the documentation as we are going to need to integrate Salesforce with Social Tables shortly, so I am really new to Social Tables.
Specifically, we will need to sync data between the CRM and Social Tables Events and Guests, and maybe other objects, so it would be very helpful to have a data model or similar to check the relationships and fields available in Social Tables architecture.
I haven't found anything in the documentation, is there any way to get this, even if it's at a high level?
Thanks
Danny
To make an integration with SocialTables you'll have to do a few manual steps, there is no way to do this completely programmatic from my experience. You'll also have to be prepared to contact SocialTables to get get correct guestlist ids. Also keep in mind that the API documentation isn't always correct, the API logic is also quite difficult to understand from time to time.
The first thing you need to do is figure out which version of the Venue Mapper you use. You'd want to use the 4.0 api and as far as I know this version of the api is only supported by Venue Mapper 3.0. I believe the Venue Mapper 3.0 is the frontend tool SocialTables provides to do the venue planning.
In social tables an event has two ids, one numerical one and one alpha-numerical one, when you use the 4.0/events endpoint you only get the alpha-numerical event id, and your going to need the numerical one. The only way I've been able to get the numerical id is to pull it out from the url when using the Venue Mapper, example of the url follows below:
https://plan.socialtables.com/team/{team_id}/event/{event_id}/space/{space_id}
Now you need to get the guestlist id, you can get that by using the following url, using the numerical event id:
GET https://api.socialtables.com/4.0/diagrams?event={numerical_event_id}
This endpoint return a json structure where one of the parameters is "guestlist_id".
Please be aware that the guestlist id you get from this endpoint might not be the correct one. I struggled quite a bit with this part and ended up with SocialTables sending me the guestlist id by email.
To get the guests in your guestlist use the following api endpoint:
GET https://api.socialtables.com/4.0/guestlists/{guestlist_id}
The {guestlist_id} is an alpha-numerical string similar to: cfdac1c0-yb1d-12e6-84a5-a39e92131645
And by that you should hopefully get access to your guests.
Hey thanks for using our API.
To answer your question, the best way to see the data model at the moment is to access our developer portal and use the API console to see what is returned. For events you will need to know the team id of the team you are working with use the team events endpoint to get access to the event ids.
https://developer.socialtables.com/api-console#!/Events/get_4_0_legacyvm3_teams_team_events
This will return some basic information about each event for that team. You can then request additional details for specific events by using this endpoint:
https://developer.socialtables.com/api-console#!/Events/get_4_0_legacyvm3_events_event

Get informations of a list of venues

I have a list of venues id and I want to get informations about each venue. I have to make a request for each venue with https://api.foursquare.com/v2/venues/VENUE_ID ?
There are no way to make one request for the list of venues ?
Thanks
There's no way to provide a list of venues to get back venue details. (As Martin mentions, there's a /multi/ endpoint, but each sub-request still counts against your rate limits).
Foursquare allows you to cache venue details for up to 30 days, so you be sure to do local caching to avoid unnecessary calls to the API. See the Retention section of https://foursquare.com/legal/api/platformpolicy for more details
Although it doesn't seem to be listed in the current version of the documentation, there is a multi endpoint which allows you to combine (up to) five API requests into one. Hopefully this will help somewhat with reducing the number of calls you need to make to get the details for the list of venues.