Apr
19
Mon
flight booking #42
5:54 AM – 5:54 AM
From GBP5965.05
bookings / #42
5:54 AM – 5:54 AM
From GBP5965.05
curl -sS \
"https://example-data.com/api/v1/bookings/42" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/bookings/42"
);
const booking = await res.json();import type { Booking } from "https://example-data.com/types/bookings.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/bookings/42"
);
const booking = (await res.json()) as Booking;import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/42"
)
booking = res.json() {
"id": 42,
"userId": 112,
"kind": "flight",
"referenceId": 137,
"checkInAt": "2027-04-19T05:54:38.907Z",
"checkOutAt": "2027-04-19T05:54:38.907Z",
"status": "completed",
"totalAmount": 5965.05,
"currency": "GBP",
"createdAt": "2027-02-13T05:54:38.907Z"
}