Apr
30
Fri
flight booking #27
8:36 PM – 8:36 PM
From CAD7791.11
bookings / #27
8:36 PM – 8:36 PM
From CAD7791.11
curl -sS \
"https://example-data.com/api/v1/bookings/27" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/bookings/27"
);
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/27"
);
const booking = (await res.json()) as Booking;import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/27"
)
booking = res.json() {
"id": 27,
"userId": 58,
"kind": "flight",
"referenceId": 213,
"checkInAt": "2027-04-30T20:36:49.639Z",
"checkOutAt": "2027-04-30T20:36:49.639Z",
"status": "confirmed",
"totalAmount": 7791.11,
"currency": "CAD",
"createdAt": "2027-02-15T20:36:49.639Z"
}