Some Airport-Codes not working - amadeus

in all Amadeus Self-Service APIs only some Airport codes work. For example "FRA" works, but "TXL" doesn't. Is this because the API is in Beta and I only use the Sandbox version?
Example:
https://test.api.amadeus.com/v1/shopping/flight-destinations?origin=FRA&oneWay=false&nonStop=false
WORKS
https://test.api.amadeus.com/v1/shopping/flight-destinations?origin=TXL&oneWay=false&nonStop=false
{
"errors": [
{
"status": 500,
"code": 141,
"title": "SYSTEM ERROR HAS OCCURRED",
"detail": "DATA DOMAIN NOT FOUND FOR REQUEST"
}
]
}

The APIs available in the test environment have a limit set of data (cache or fake data).
In the test environment, this API doesn't have data for TXL as origin, for Germany you have FRA and MUC.
So far our data set covers more the US and some big cities in the world. We will publish soon the list of available data on our portal.
You can find the list of available data in the test environment on our GitHub page.

Related

How can I get hotels and rooms Images (pictures) from Amadeus Self-Service API V3?

I'm trying to get hotels catalogue from Amadeus api v3, so far, I found all informations like name, rating, offers ... but still have to get pictures to display the returned data on a front-office.
I tried : view=FULL and view=FULL_ALL_IMAGE doesn't make any changes on the response.
Any help please ? :(
I tried also this request :
'ghttps://api.amadeus.com/v3/hotels/images?hotelId={{Hotels_IDs}}&size=FULL&aspectRatio=16:9'
I get this error message :
`{
"code": 38196,
"title": "Resource not found",
"detail": "The targeted resource doesn't exist",
"status": 404
}`
The Hotel Search v3 doesn't return images. For workarounds check the migration guide.

This location is unknown

Today I started getting This location is unknown errors on almost every Flight Offers Search call to the test API. I'm using this data https://github.com/amadeus4dev/data-collection/blob/master/data/flightsearch.md to make requests.
The kind of error that I get is this:
{
"code": 4926,
"title": "INVALID DATA RECEIVED",
"detail": "This location code is unknown",
"status": 400
}
Is there something going on today with test API? On friday everything worked.

Amadeus Point of Interest Search API: Received INVALID DATA RECEIVED with message Sandbox coordinates out of the allowed box

While using Amadeus Java SDK Point of Interest API on test environment, I provided the longitude and latitude received from the city search API, but I got "Invalid Data Received" with detailed message as "Sandbox coordinates out of the allowed box". I am getting similar response while trying directly from Amadeus Self Service API's.
Below is the request URL and response received:-
Request
https://test.api.amadeus.com/v1/reference-data/locations/pois?latitude=77.10309&longitude=28.5665&radius=1&page%5Blimit%5D=10&page%5Boffset%5D=0
Response
{
"errors": [
{
"status": 400,
"code": 4926,
"title": "INVALID DATA RECEIVED",
"detail": "Sandbox coordinates out of the allowed box",
"source": {
"parameters": [
"latitude",
"longitude",
"radius"
]
}
}
]
}
This is because you use the test environment which is free of charge but limited (limited number of calls per API per month and limited set of data as compared to production).
You can find here the data available in test for all our APIs and here the list of supported cities for Points Of Interest in test.
Note that in addition to the limited number of cities you will get only a maximum of 10 POIs.

Use of Amadeus Trip parser API

UPDATE : Fix one problem with the content-type of the request which has to be application/vnd.amadeus+json 🤷‍♂️ After the fix, lot of mails are not able to be parse without additional details. Amadeus support kind of confirmed me that my test mails are from providers that are not supported :/
I try to use Self-Service Trip Parser API https://developers.amadeus.com/self-service/category/trip/api-doc/trip-parser
I did some testing using confirmation emails from well-known brand like Booking or Oui SNCF but with no success and generally got 500 generic errors.
What I do is :
go to gmail, download the message as .eml format
encode it to base 64 base64 -i mail.eml | tr -d '\n' | pbcopy
create the payload to send to Amadeus using own Amadeus Swagger but got 500 errors in most case
{
"data": {
"type": "trip-parser-job",
"content": "<paste mail content>"
}
}
{
"errors": [
{
"code": "38189",
"title": "Internal error",
"detail": "An internal error occurred, please contact your administrator",
"status": "500"
}
]
}
In best case, the job is created, but the status is failure after a few minutes
Only using mail PDF attachment seems to work sometimes.
My questions are simple :
do any of you make it works reliably ?
is there any additional information on support input format or providers ?
is there any worthwhile alternative ?

Wit AI response for API requests

I'm using wit ai for a bot and I think it's amazing. However, I must provide the customer with screens in my web app to train and manage the app. And here I found a big problem (or maybe I'm just lost). The documentation of the REST API is not enough to design a client that acts like the wit console (not even close). it's like a tutorial of what endpoints you can hit and an overview of the parameters, but no clean explanation of the structure of the response.
For example, there is no endpoint to get the insights edge. Also and most importantly, no clear documentation about the response structure when hitting the message endpoints (i.e. the structure the returned entities: are they prebuilt or not, and if they are, is the value a string or an object or array, and what the object might contain [e.g. datetime]). Also the problem of the deprecated guide and the new guide (the new guide should be done and complete by now). I'm building parts of the code based on my testing. Sometimes when I test something new (like adding a range in the datetime entity instead of just a value), I get an error when I try to set the values to the user since I haven't parsed the response right, and the new info I get makes me modify the DB structure at my end sometimes.
So, the bottom line, is there a complete reference that I can implement a complete client in my web app (my web app is in Java by the way and I couldn't find a client library that handles the latest version of the API)? Again, the tool is AWESOME but the documentation is not enough, or maybe I'm missing something.
The document is not enough of course but I think its pretty straightforward. And from what I read there is response structure under "Return the meaning of a sentence".
It's response in JSON format. So you need to decode the response first.
Example Request:
$ curl -XGET 'https://api.wit.ai/message?v=20170307&q=how%20many%20people%20between%20Tuesday%20and%20Friday' \
-H 'Authorization: Bearer $TOKEN'
Example Response:
{
"msg_id": "387b8515-0c1d-42a9-aa80-e68b66b66c27",
"_text": "how many people between Tuesday and Friday",
"entities": {
"metric": [ {
"metadata": "{'code': 324}",
"value": "metric_visitor",
"confidence": 0.9231
} ],
"datetime": [ {
"value": {
"from": "2014-07-01T00:00:00.000-07:00",
"to": "2014-07-02T00:00:00.000-07:00"
},
"confidence": 1
}, {
"value": {
"from": "2014-07-04T00:00:00.000-07:00",
"to": "2014-07-05T00:00:00.000-07:00"
},
"confidence": 1
} ]
}
}
You can read more about response structure under Return the meaning of a sentence