Aug
20
Wed
flight booking #158
9:34 AM – 9:34 AM
From AUD 811.68
Overview
bookings / #158
9:34 AM – 9:34 AM
From AUD 811.68
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/158" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/158" ); 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/158"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/158"
)
booking = res.json() Response
{
"id": 158,
"userId": 23,
"kind": "flight",
"referenceId": 354,
"checkInAt": "2025-08-20T09:34:54.205Z",
"checkOutAt": "2025-08-20T09:34:54.205Z",
"status": "cancelled",
"totalAmount": 811.68,
"currency": "AUD",
"createdAt": "2025-08-12T09:34:54.205Z"
}