May
2
Sun
flight booking #323
3:41 AM – 3:41 AM
From USD 1651.36
Overview
bookings / #323
3:41 AM – 3:41 AM
From USD 1651.36
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/323" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/323" ); const booking = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/bookings.d.ts https://example-data.com/types/bookings.d.ts
import type { Booking } from "./types/bookings";
const res = await fetch(
"https://example-data.com/api/v1/bookings/323"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/323"
)
booking = res.json() Response
{
"id": 323,
"userId": 37,
"kind": "flight",
"referenceId": 217,
"checkInAt": "2027-05-02T03:41:54.165Z",
"checkOutAt": "2027-05-02T03:41:54.165Z",
"status": "cancelled",
"totalAmount": 1651.36,
"currency": "USD",
"createdAt": "2027-02-20T03:41:54.165Z"
}