example-data.com
Menu
Browse docs and collections

Overview

flights / #339

Jul
17
Thu

Delta Air Lines DL3604

3:07 PM – 5:35 PM

SYD → FCO

From EUR 1817.87

Component variants

Related

Referenced by

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/flights/339" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/flights/339"
);
const flight = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/flights.d.ts https://example-data.com/types/flights.d.ts
import type { Flight } from "./types/flights";

const res = await fetch(
  "https://example-data.com/api/v1/flights/339"
);
const flight = (await res.json()) as Flight;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/flights/339"
)
flight = res.json()

Response

{
  "id": 339,
  "flightNumber": "DL3604",
  "airline": "Delta Air Lines",
  "departureAirport": "SYD",
  "arrivalAirport": "FCO",
  "departureAt": "2025-07-17T15:07:29.241Z",
  "arrivalAt": "2025-07-17T17:35:29.241Z",
  "durationMinutes": 148,
  "status": "cancelled",
  "priceFrom": 1817.87,
  "currency": "EUR",
  "createdAt": "2025-06-04T15:07:29.241Z"
}