APIFlight

List flights

List all your flights.

GET
/flight/list

Authorization

Authorization
Required
Bearer <token>

Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.

In: header

curl -X GET "https://example.com/api/flight/list" \
  -H "Authorization: Bearer <token>"

A list of flights

{
  "flights": [
    {
      "id": 1,
      "from": "EKCH",
      "to": "KJFK",
      "departure": "2021-09-01T23:00:00.000+00:00",
      "arrival": "2021-09-02T10:00:00.000+00:00",
      "seats": [
        {
          "userId": "user1",
          "guestName": null,
          "seat": "aisle",
          "seatNumber": "1A",
          "seatClass": "economy"
        }
      ],
      "airline": "BAW",
      "flightNumber": "BA178",
      "aircraft": "A388",
      "aircraftReg": "G-VIIL",
      "flightReason": "leisure",
      "notes": "This is a test flight."
    }
  ]
}

Edit on GitHub

Last updated on