How to get the Flight Current Status and Delay using On-Demand Flight Status API

98 Views Asked by At

I am using the API from C# via a GET call. After authenticating and activating the production environment (changing Base URL, API Key and API Secret) I still don't get the flight status and delay information.

The API always return a JSON with the test environment format.

Can you help me?

I tried to switch the environment from test to production: changed Base Url, API Key and API Secret. Also make a call with Postman returns the same data. I have no problem with the authentication.

This is the response for a scheduled flight:

{
  "meta" : {
    "count" : 1,
    "links" : {
      "self" : "https://api.amadeus.com/v2/schedule/flights?carrierCode=FR&flightNumber=4231&scheduledDepartureDate=2023-10-25"
    }
  },
  "data" : [ {
    "type" : "DatedFlight",
    "scheduledDepartureDate" : "2023-10-25",
    "flightDesignator" : {
      "carrierCode" : "FR",
      "flightNumber" : 4231
    },
    "flightPoints" : [ {
      "iataCode" : "BGY",
      "departure" : {
        "timings" : [ {
          "qualifier" : "STD",
          "value" : "2023-10-25T12:00+02:00"
        } ]
      }
    }, {
      "iataCode" : "BVA",
      "arrival" : {
        "timings" : [ {
          "qualifier" : "STA",
          "value" : "2023-10-25T13:40+02:00"
        } ]
      }
    } ],
    "segments" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BVA",
      "scheduledSegmentDuration" : "PT1H40M",
      "partnership" : {
        "operatingFlight" : {
          "carrierCode" : "AL"
        }
      }
    } ],
    "legs" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BVA",
      "aircraftEquipment" : {
        "aircraftType" : "73Q"
      },
      "scheduledLegDuration" : "PT1H40M"
    } ]
  } ]
}

And this is a response for a landed flight:

{
  "meta" : {
    "count" : 1,
    "links" : {
      "self" : "https://api.amadeus.com/v2/schedule/flights?carrierCode=FR&flightNumber=3653&scheduledDepartureDate=2023-10-25"
    }
  },
  "data" : [ {
    "type" : "DatedFlight",
    "scheduledDepartureDate" : "2023-10-25",
    "flightDesignator" : {
      "carrierCode" : "FR",
      "flightNumber" : 3653
    },
    "flightPoints" : [ {
      "iataCode" : "BGY",
      "departure" : {
        "timings" : [ {
          "qualifier" : "STD",
          "value" : "2023-10-25T07:55+02:00"
        } ]
      }
    }, {
      "iataCode" : "BRI",
      "arrival" : {
        "timings" : [ {
          "qualifier" : "STA",
          "value" : "2023-10-25T09:25+02:00"
        } ]
      }
    } ],
    "segments" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BRI",
      }
    } ],
    "segments" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BRI",
      "scheduledSegmentDuration" : "PT1H30M",
      "partnership" : {
        "operatingFlight" : {
          "carrierCode" : "AL"
        }
      }
    } ],
    "legs" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BRI",
      "aircraftEquipment" : {
      "scheduledSegmentDuration" : "PT1H30M",
      "partnership" : {
        "operatingFlight" : {
          "carrierCode" : "AL"
        }
      }
    } ],
    "legs" : [ {
      "boardPointIataCode" : "BGY",
      "offPointIataCode" : "BRI",
      "aircraftEquipment" : {
        "aircraftType" : "73Q"
      },
      "scheduledLegDuration" : "PT1H30M"
    } ]
  } ]
}

Thank you

0

There are 0 best solutions below