May
15
Sat
flight booking #143
3:25 PM – 3:25 PM
From CAD 2538.37
Overview
bookings / #143
3:25 PM – 3:25 PM
From CAD 2538.37
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/143" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/143" ); 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/143"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/143"
)
booking = res.json() Response
{
"id": 143,
"userId": 109,
"kind": "flight",
"referenceId": 98,
"checkInAt": "2027-05-15T15:25:10.263Z",
"checkOutAt": "2027-05-15T15:25:10.263Z",
"status": "completed",
"totalAmount": 2538.37,
"currency": "CAD",
"createdAt": "2027-04-24T15:25:10.263Z"
}