Search code examples
amadeus

Amadeus Fare Rule request


Amedeus Api call, I'm passing "include=detailed-fare-rules" in url encoded

https://test.api.amadeus.com/v2/shopping/flight-offers/pricing?include=detailed-fare-rules&originLocationCode=ISB&destinationLocationCode=KHI&departureDate=2022-05-01&returnDate=2022-05-18&adults=1&max=5

but it return the below error.
{
    "errors": [
        {
            "status": 404,
            "title": "No routing found for this resource/method/version combination.",
            "code": 700,
            "source": {
                "pointer": "uri"
            }
        }
    ]
}

Solution

  • The Flight Offers Price API supports a POST method and only the include and forceClass are allowed as query parameters. Please check the API reference of the API.

    The correct way to call the API to return the fare rules is the following:

    POST https://test.api.amadeus.com/v1/shopping/flight-offers/pricing?include=detailed-fare-rules

    with the following body:

    {
       "data":{
          "type":"flight-offers-pricing",
          "flightOffers":[
              .....
          ]
       }
    }
    

    In the flightOffers you have to pass the flight offer returned by the Flight Offers Search API for which you are looking the fare rules.