May
2
Sun
British Airways BA5021
3:41 AM – 2:55 PM
ATL → LHR
From SGD55.33
flights / #217
3:41 AM – 2:55 PM
ATL → LHR
From SGD55.33
curl -sS \
"https://example-data.com/api/v1/flights/217" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/flights/217"
);
const flight = await res.json();import type { Flight } from "https://example-data.com/types/flights.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/flights/217"
);
const flight = (await res.json()) as Flight;import requests
res = requests.get(
"https://example-data.com/api/v1/flights/217"
)
flight = res.json() {
"id": 217,
"flightNumber": "BA5021",
"airline": "British Airways",
"departureAirport": "ATL",
"arrivalAirport": "LHR",
"departureAt": "2027-05-02T03:41:54.165Z",
"arrivalAt": "2027-05-02T14:55:54.165Z",
"durationMinutes": 674,
"status": "cancelled",
"priceFrom": 55.33,
"currency": "SGD",
"createdAt": "2027-04-29T03:41:54.165Z"
}