Amadeus Flight Offers Different Prices - amadeus

We're using flight offers search api and ready to move to prod. But when we search flights with ECONOMY class the prices are not even close to "amadeus.net" search engine results or TK (Turkish Airlines) web site prices. If we use BUSINESS class as a parameter the api results are closer to real prices. How can we solve this issue?
The sample query is: (IST - CGN 25th May ECONOMY and TK Opearated flight departures 16:05 )
/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250
The api result is: €206.55
TK Web Site: €121
Amadeus.net €103
Detailed API result:
{
"meta": {
"count": 2,
"links": {
"self": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250"
}
},
"data": [
{
"type": "flight-offer",
"id": "2",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2021-05-25",
"numberOfBookableSeats": 9,
"itineraries": [
{
"duration": "PT3H20M",
"segments": [
{
"departure": {
"iataCode": "IST",
"at": "2021-05-25T16:05:00"
},
"arrival": {
"iataCode": "CGN",
"terminal": "2",
"at": "2021-05-25T18:25:00"
},
"carrierCode": "TK",
"number": "1675",
"aircraft": {
"code": "321"
},
"operating": {
"carrierCode": "TK"
},
"duration": "PT3H20M",
"id": "2",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "206.55",
"base": "134.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "206.55"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [
"TK"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "206.55",
"base": "134.00"
},
"fareDetailsBySegment": [
{
"segmentId": "2",
"cabin": "ECONOMY",
"fareBasis": "QT2PXOW",
"class": "Q",
"includedCheckedBags": {
"weight": 30,
"weightUnit": "KG"
}
}
]
}
]
}
],
"dictionaries": {
"locations": {
"SAW": {
"cityCode": "IST",
"countryCode": "TR"
},
"CGN": {
"cityCode": "CGN",
"countryCode": "DE"
},
"IST": {
"cityCode": "IST",
"countryCode": "TR"
}
},
"aircraft": {
"321": "AIRBUS A321",
"738": "BOEING 737-800"
},
"currencies": {
"EUR": "EURO"
},
"carriers": {
"TK": "TURKISH AIRLINES"
}
}
}
Thanks in advance

There are two reasons why you see different prices:
The Self-Service APIs return published airfares coming from the GDS and not any negotiated ones. That means the flights returned by the APIs can be more expensive than the ones you find in OTAs or airline websites.
In the test environment that you are using, you get access to cached flight data which might be different from the live prices.

Related

Is it correct to see a different cabin value aside that passed in the get FlightOffers APi as travelerClass?

From the documentation of the Get Route for the flight offers Api, I can add travelerClass as a filter to make a request. If I add say travelerClass as ECONOMY?
I expect to see only offers with ECONOMY. However I see that within the fareDetailsBySegment section in the result, I see that some Offers have their cabin values as other than ECONOMY. I see some with value of BUSINESS while others as PREMIUM_ECONOMY.
Is this proper?
My Concern
I want to be able to get all bookings that where ECONOMY based only. So I need to be sure that the flight offers returned in the first place are strictly limited by the travelerClass.
I will appreciate any clarity on the this issue. Also if there is a better way to go about this concern above, it will be most appreciated.
An example of my request is below:
Amadeus.shopping.flightOffersSearch.get({
originLocationCode: 'SYD',
destinationLocationCode: 'BKK',
departureDate: '2022-11-01',
adults: '1',
travelClass: 'ECONOMY'
}).then(...)
Offer with BUSINESS instead of ECONOMY
{
"type": "flight-offer",
"id": "22",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2022-11-01",
"numberOfBookableSeats": 6,
"itineraries": [
{
"duration": "PT28H20M",
"segments": [
{
"departure": {
"iataCode": "SYD",
"terminal": "1",
"at": "2022-11-01T12:00:00"
},
"arrival": {
"iataCode": "PVG",
"terminal": "2",
"at": "2022-11-01T19:30:00"
},
"carrierCode": "MU",
"number": "562",
"aircraft": {
"code": "77W"
},
"operating": {
"carrierCode": "MU"
},
"duration": "PT10H30M",
"id": "13",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "PVG",
"terminal": "1",
"at": "2022-11-02T08:45:00"
},
"arrival": {
"iataCode": "BKK",
"at": "2022-11-02T12:20:00"
},
"carrierCode": "MU",
"number": "541",
"aircraft": {
"code": "320"
},
"operating": {
"carrierCode": "MU"
},
"duration": "PT4H35M",
"id": "14",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "4048.84",
"base": "3858.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "4048.84"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [
"MU"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "4048.84",
"base": "3858.00"
},
"fareDetailsBySegment": [
{
"segmentId": "13",
"cabin": "ECONOMY",
"fareBasis": "YSE0WDNQ",
"class": "Y",
"includedCheckedBags": {
"quantity": 2
}
},
{
"segmentId": "14",
"cabin": "BUSINESS",
"fareBasis": "QSE0WCNL",
"class": "Q",
"includedCheckedBags": {
"quantity": 2
}
}
]
}
]
}
in order to apply the filter for cabin class, I suggest you to try with POST method.
in POST method has more search criteria you can apply, below example is something that I have tried and it works: response only contains ECONOMY classes by updating values under cabinRestrictions.
details of the request model is available in API reference page
amadeus.shopping.flightOffersSearch.post(JSON.stringify({
"currencyCode": "USD",
"originDestinations": [
{
"id": "1",
"originLocationCode": "SYD",
"destinationLocationCode": "BKK",
"departureDateTimeRange": {
"date": "2022-11-01"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"maxFlightOffers": 10,
"flightFilters": {
"cabinRestrictions": [
{
"cabin": "ECONOMY",
"coverage": "ALL_SEGMENTS",
"originDestinationIds": [
1
]
}
]
}
}
})).then(...)

Square API: Object version does not match latest database version

I'm trying to use the following Square API endpoint to update an item, but I'm getting some errors. Here is the item that I'm trying to update.
{
"type": "ITEM",
"id": "7HXK6NVBDKSOK64CCAYZJ2KW",
"updated_at": "2020-08-08T21:43:41.849Z",
"version": 1596923021849,
"is_deleted": false,
"present_at_all_locations": false,
"present_at_location_ids": [
"1JZ5JTPBW0EXY"
],
"item_data": {
"name": "Hummus Plate",
"description": "Olives, feta, tomatoes, tzatziki and warm pita.",
"visibility": "PRIVATE",
"category_id": "ARB5LTTDUSER6T66ZWYO65FL",
"variations": [
{
"type": "ITEM_VARIATION",
"id": "HBIHPLROOJUUNUSW3BZUDQ5J",
"updated_at": "2020-08-08T21:40:14.581Z",
"version": 1596922814581,
"is_deleted": false,
"present_at_all_locations": false,
"present_at_location_ids": [
"1JZ5JTPBW0EXY"
],
"item_variation_data": {
"item_id": "7HXK6NVBDKSOK64CCAYZJ2KW",
"name": "Regular",
"ordinal": 0,
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 1000,
"currency": "USD"
}
}
}
],
"product_type": "REGULAR",
"skip_modifier_screen": true,
"ecom_available": false,
"ecom_visibility": "UNINDEXED"
}
}
Here the body content.
{
"batches": [{
"objects": [{
"type": "ITEM_VARIATION",
"id": "T6KKCATDIU2VV4BDBMVGML4W",
"item_variation_data": {
"item_id": "FNWWGFTBQWFAYK6JGBD3LDLD",
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 150,
"currency": "USD"
}
}
}]
}],
"idempotency_key": "61994762-3a6s-4b75-sf81-fdfaf"
}
Here is the error I'm getting:
**{
"errors": [
{
"category": "INVALID_REQUEST_ERROR",
"code": "VERSION_MISMATCH",
"detail": "Object version does not match latest database version.",
"field": "version"
}
]
}**
I'm not sure what I'm doing wrong, but I appreciate any help I can get. Thank you in advance!
When updating a catalog object in Square, you need to provide the latest version number in the request.
{
"batches": [{
"objects": [{
"type": "ITEM_VARIATION",
"id": "T6KKCATDIU2VV4BDBMVGML4W",
"version": "12345",
"item_variation_data": {
"item_id": "FNWWGFTBQWFAYK6JGBD3LDLD",
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 150,
"currency": "USD"
}
}
}]
}],
"idempotency_key": "61994762-3a6s-4b75-sf81-fdfaf"
}

extra bag information is missing in the flight offer price response

I'm testing self-service APIs. I wonder if this is a bug:
I make a search request, and the response contains the extra bag information in the flight-offer/price/additionalServices
Then I make the offer price request by adding include=bags parameter in the path of Flight Offers Price API.
However there is no any bags information in the response, neither in the offer/price/additionalServices, nor in the included/.
I still try to create order by adding the extra bag. So I use the extra bag information that I got at step 1 (search response). And the order is created successfully.
It seems that the extra bag information is missing in step 2 (response of flight offer price), is it a bug?
Here is an example of my test to reproduce the issue:
search request
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "PAR",
"destinationLocationCode": "NYC",
"departureDateTimeRange": {
"date": "2020-08-20",
"time": "10:00:00"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"maxFlightOffers": 3
}
}
Then I select the second offer in the response to make a offer price request using include=bags parameter
{
"type": "flight-offer",
"id": "2",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2020-08-13",
"numberOfBookableSeats": 8,
"itineraries": [
{
"duration": "PT8H15M",
"segments": [
{
"departure": {
"iataCode": "ORY",
"terminal": "4",
"at": "2020-08-20T19:45:00"
},
"arrival": {
"iataCode": "EWR",
"terminal": "B",
"at": "2020-08-20T22:00:00"
},
"carrierCode": "TX",
"number": "6720",
"aircraft": {
"code": "359"
},
"operating": {
"carrierCode": "BF"
},
"duration": "PT8H15M",
"id": "3",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "149.44",
"additionalServices": [
{
"amount": "70.00",
"type": "CHECKED_BAGS"
}
]
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": false
},
"validatingAirlineCodes": [
"TX"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00"
},
"fareDetailsBySegment": [
{
"segmentId": "3",
"cabin": "ECONOMY",
"fareBasis": "ULBCOWFR",
"brandedFare": "EBASIC",
"class": "U",
"includedCheckedBags": {
"quantity": 0
}
}
]
}
]
}
There is no extra bag in the response.
Thanks

Error sending dateTimeRange flight filters on request

I am sending a POST request with dateTimeRange filters to get flight offers on a particular time range.
When I use the departureDateTimeRange OR arrivalDateTimeRange, the response is working fine and returning the flights filtered by the departure/arrival time ranges that I have defined
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "OPO",
"destinationLocationCode": "FNC",
"arrivalDateTimeRange": {
"date": "2020-07-23",
"time": "21:00:00",
"timeWindow": "2H",
"dateWindow": "P1D"
}
},
{
"id": "2",
"originLocationCode": "FNC",
"destinationLocationCode": "OPO",
"departureDateTimeRange": {
"date": "2020-07-24",
"time": "08:00:00",
"timeWindow": "1H",
"dateWindow": "P1D"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"flightFilters": {
"cabinRestrictions": [
{
"cabin": "ECONOMY",
"coverage": "ALL_SEGMENTS",
"originDestinationIds": [
"1",
"2"
]
}
],
"connectionRestriction": {
"maxNumberOfConnections": 2
}
},
"pricingOptions": {
"includedCheckedBagsOnly": true
}
}
}
But I'd like to filter the Departure time AND the Arrival time altogether... let's pretend I want to departure between 07:00h and 09:00h, and arrive between 08:00h and 09:00h, in a 1 hour flight.
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "OPO",
"destinationLocationCode": "LIS",
"departureDateTimeRange": {
"date": "2020-07-23",
"time": "08:00:00",
"timeWindow": "1H",
"dateWindow": "P1D"
},
"arrivalDateTimeRange": {
"date": "2020-07-23",
"time": "09:00:00",
"timeWindow": "1H",
"dateWindow": "P1D"
}
},
{
"id": "2",
"originLocationCode": "LIS",
"destinationLocationCode": "OPO",
"departureDateTimeRange": {
"date": "2020-07-24",
"time": "08:00:00",
"timeWindow": "1H",
"dateWindow": "P1D"
},
"arrivalDateTimeRange": {
"date": "2020-07-24",
"time": "09:00:00",
"timeWindow": "1H",
"dateWindow": "P1D"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"flightFilters": {
"cabinRestrictions": [
{
"cabin": "ECONOMY",
"coverage": "ALL_SEGMENTS",
"originDestinationIds": [
"1",
"2"
]
}
],
"connectionRestriction": {
"maxNumberOfConnections": 2
}
},
"pricingOptions": {
"includedCheckedBagsOnly": true
}
}
The response is an error:
"errors": [
{
"code": 2668,
"title": "PARAMETER COMBINATION INVALID/RESTRICTED",
"detail": "departureDateTimeRange and arrivalDateTimeRange are not compatible",
"source": {
"pointer": "/originDestinations[0]"
},
"status": 400
},
{
"code": 2668,
"title": "PARAMETER COMBINATION INVALID/RESTRICTED",
"detail": "departureDateTimeRange and arrivalDateTimeRange are not compatible",
"source": {
"pointer": "/originDestinations[1]"
},
"status": 400
}
]
Does this actually mean that I cannot, at all, combine departureTimeRange and arrivalDateTimeRange on the same request, or am I doing something wrong/missing something here on the request details?
Thank you!
You are not doing anything wrong. The Flight Offers Search API doesn't allow you to search by using both the departureTimeRange AND the arrivalDateTimeRange, you can use one or the other feature. The logic behind is to return all the flights available to either leave at a specific time or to arrive at the destination at a specific time.
If you want to check the departureTime AND the arrivalTime you need to use departureTimeRange and filter in the response the arrivalTime.
If you want to have the list of flights that either leave at a specific time OR arrive at a specific time then you need to call the API twice using once departureTimeRange and the other one arrivalDateTimeRange.

Can't use includedCheckedBags attribute in Amadeus Flight Offers API

When I try to create a request in the test environment that returns tickets with checked bags only I receive the following error:
{
"errors": [
{
"code": 2668,
"title": "PARAMETER COMBINATION INVALID/RESTRICTED",
"detail": "Pricing option includedCheckedBags is true but officeId is not allowed",
"status": 400
}
]
}
I'm trying this from the API explorer in the test environment.
This is the full body of my request:
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "MAD",
"destinationLocationCode": "NYC",
"departureDateTimeRange": {
"date": "2019-09-01",
"time": "10:00:00",
"timeWindow" : "6H"
}
},
{
"id": "2",
"originLocationCode": "NYC",
"destinationLocationCode": "MIA",
"departureDateTimeRange": {
"date": "2019-09-03",
"time": "17:00:00",
"timeWindow": "2H"
}
},
{
"id": "3",
"originLocationCode": "MCO",
"destinationLocationCode": "MAD",
"departureDateTimeRange": {
"date": "2019-09-07",
"time": "17:00:00",
"timeWindow": "6H"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT",
"fareOptions": [
"STANDARD"
]
}
],
"sources": [
"GDS", "PYTON"
],
"searchCriteria": {
"maxFlightOffers": 50,
"pricingOptions" : {
"includedCheckedBagsOnly" : true
},
"flightFilters": {
"connectionRestriction":
{
"airportChangeAllowed" : false,
"maxNumberOfConnections" : 1
},
"cabinRestrictions":
[{
"cabin" : "BUSINESS",
"coverage" : "MOST_SEGMENTS",
"originDestinationIds" : ["1", "2", "3"]
}]
}
}
}
I would expect this to work, since it is documented in the API page, but the error message is not helpful at all.
Everything has been fixed in the test and in the production environment.