amadeus4dev / amadeus-python

Python library for the Amadeus Self-Service travel APIs
https://developers.amadeus.com
MIT License
195 stars 77 forks source link

Air Asia Flights aren't showing, Prices are higher for normal flights #214

Open TheROCKoManz opened 1 month ago

TheROCKoManz commented 1 month ago

Description

Hi, it seems that Amadeus Flights Search Offer API is not returning the flights listed by Air Asia. Moreover, the prices for some flights are showing much higher than the official website checkout prices, without any additional baggage or services. Note that I'm using the Production Mode API for getting the flight offers.

I'm not sure why I am getting such a high price in comparison to the original website price even without any add-ons or such and what can I correct in the request to rectify the response. Note that the final price is same when I verified in the Offer-Price API after getting the response.

Additionally, I am not getting any listed flights from Air Asia in Amadeus API. Is it not available on Amadeus or do I have to enable it with any parameter?

Query


I tried to query flights for the following details in Amadeus API, Skyscanner and Google Flights:

For this query, I'm getting the cheapest flight as Batik Air (DEL to DPS) with a final cost of INR 28,929.77 with only 7kg Carry Bag and no Checking Bag.

Below is the retrieved flight details from Skyscanner/Agoda: DPS to DPS: image

DPS to DEL: image

Here is the final price I am getting on Agoda: image

For the same flight, on Amadeus API I got the total price of INR 51410.00 without any additions, which is way beyond the price on Agoda or other websites (almost 2x).

Request Body

Here is the request body that I used to get the flight offer:

{
  "currencyCode": "INR",
  "originDestinations": [
    {
      "id": "1",
      "originLocationCode": "DEL",
      "destinationLocationCode": "DPS",
      "departureDateTimeRange": {
        "date": "2024-09-09",
        "timeWindow": "6H",
        "time": "00:00:00"
      }
    },
    {
      "id": "2",
      "originLocationCode": "DPS",
      "destinationLocationCode": "DEL",
      "departureDateTimeRange": {
        "date": "2024-09-18"
      }
    }
  ],
  "travelers": [
    {
      "id": "1",
      "travelerType": "ADULT"
    }
  ],
  "sources": [
    "GDS"
  ],
  "searchCriteria": {
    "moreOvernightsAllowed":true,
    "allowAlternativeFareOptions":true,
    "additionalInformation":{
        "chargeableCheckedBags":false,
        "brandedFares":false
    },
    "pricingOptions": {
        "includedCheckedBagsOnly": false
    },
    "flightFilters": {
        "cabinRestrictions": [
            {
                "cabin": "ECONOMY",
                "coverage": "MOST_SEGMENTS",
                "originDestinationIds": [
                    "1", "2"
                ]
            }
      ],
      "carrierRestrictions": {
        "includedCarrierCodes":["OD"]
      },
      "connectionRestriction":{
        "maxNumberOfConnections":1
      }
    }
  }
}

Response Object Body

And below is the response body of the flight we are comparing with Skyscanner/Agoda:

{
            "type": "flight-offer",
            "id": "9",
            "source": "GDS",
            "instantTicketingRequired": false,
            "nonHomogeneous": false,
            "oneWay": false,
            "isUpsellOffer": false,
            "lastTicketingDate": "2024-07-28",
            "lastTicketingDateTime": "2024-07-28",
            "numberOfBookableSeats": 3,
            "itineraries": [
                {
                    "duration": "PT13H5M",
                    "segments": [
                        {
                            "departure": {
                                "iataCode": "DEL",
                                "terminal": "3",
                                "at": "2024-09-08T22:05:00"
                            },
                            "arrival": {
                                "iataCode": "KUL",
                                "terminal": "1",
                                "at": "2024-09-09T06:10:00"
                            },
                            "carrierCode": "OD",
                            "number": "206",
                            "aircraft": {
                                "code": "7M8"
                            },
                            "operating": {
                                "carrierCode": "OD"
                            },
                            "duration": "PT5H35M",
                            "id": "5",
                            "numberOfStops": 0,
                            "blacklistedInEU": false
                        },
                        {
                            "departure": {
                                "iataCode": "KUL",
                                "terminal": "1",
                                "at": "2024-09-09T10:30:00"
                            },
                            "arrival": {
                                "iataCode": "DPS",
                                "terminal": "0",
                                "at": "2024-09-09T13:40:00"
                            },
                            "carrierCode": "OD",
                            "number": "306",
                            "aircraft": {
                                "code": "738"
                            },
                            "operating": {
                                "carrierCode": "OD"
                            },
                            "duration": "PT3H10M",
                            "id": "6",
                            "numberOfStops": 0,
                            "blacklistedInEU": false
                        }
                    ]
                },
                {
                    "duration": "PT11H5M",
                    "segments": [
                        {
                            "departure": {
                                "iataCode": "DPS",
                                "terminal": "0",
                                "at": "2024-09-18T12:30:00"
                            },
                            "arrival": {
                                "iataCode": "KUL",
                                "terminal": "1",
                                "at": "2024-09-18T15:40:00"
                            },
                            "carrierCode": "OD",
                            "number": "172",
                            "aircraft": {
                                "code": "738"
                            },
                            "operating": {
                                "carrierCode": "OD"
                            },
                            "duration": "PT3H10M",
                            "id": "19",
                            "numberOfStops": 0,
                            "blacklistedInEU": false
                        },
                        {
                            "departure": {
                                "iataCode": "KUL",
                                "terminal": "1",
                                "at": "2024-09-18T18:00:00"
                            },
                            "arrival": {
                                "iataCode": "DEL",
                                "terminal": "3",
                                "at": "2024-09-18T21:05:00"
                            },
                            "carrierCode": "OD",
                            "number": "205",
                            "aircraft": {
                                "code": "7M8"
                            },
                            "operating": {
                                "carrierCode": "OD"
                            },
                            "duration": "PT5H35M",
                            "id": "20",
                            "numberOfStops": 0,
                            "blacklistedInEU": false
                        }
                    ]
                }
            ],
            "price": {
                "currency": "INR",
                "total": "51410.00",
                "base": "25670.00",
                "fees": [
                    {
                        "amount": "0.00",
                        "type": "SUPPLIER"
                    },
                    {
                        "amount": "0.00",
                        "type": "TICKETING"
                    }
                ],
                "grandTotal": "51410.00"
            },
            "pricingOptions": {
                "fareType": [
                    "PUBLISHED"
                ],
                "includedCheckedBagsOnly": false
            },
            "validatingAirlineCodes": [
                "GP"
            ],
            "travelerPricings": [
                {
                    "travelerId": "1",
                    "fareOption": "STANDARD",
                    "travelerType": "ADULT",
                    "price": {
                        "currency": "INR",
                        "total": "51410.00",
                        "base": "25670.00"
                    },
                    "fareDetailsBySegment": [
                        {
                            "segmentId": "5",
                            "cabin": "ECONOMY",
                            "fareBasis": "VRTIZ",
                            "class": "V",
                            "includedCheckedBags": {
                                "weight": 0,
                                "weightUnit": "KG"
                            },
                            "includedCabinBags": {
                                "weight": 7,
                                "weightUnit": "KG"
                            }
                        },
                        {
                            "segmentId": "6",
                            "cabin": "ECONOMY",
                            "fareBasis": "NRTMY",
                            "class": "N",
                            "includedCheckedBags": {
                                "weight": 0,
                                "weightUnit": "KG"
                            },
                            "includedCabinBags": {
                                "weight": 7,
                                "weightUnit": "KG"
                            }
                        },
                        {
                            "segmentId": "19",
                            "cabin": "ECONOMY",
                            "fareBasis": "QRTMY",
                            "class": "Q",
                            "includedCheckedBags": {
                                "weight": 0,
                                "weightUnit": "KG"
                            },
                            "includedCabinBags": {
                                "weight": 7,
                                "weightUnit": "KG"
                            }
                        },
                        {
                            "segmentId": "20",
                            "cabin": "ECONOMY",
                            "fareBasis": "VRTIZ",
                            "class": "V",
                            "includedCheckedBags": {
                                "weight": 0,
                                "weightUnit": "KG"
                            },
                            "includedCabinBags": {
                                "weight": 7,
                                "weightUnit": "KG"
                            }
                        }
                    ]
                }
            ]
        }