Apr
21
Wed
flight booking #492
5:43 PM – 5:43 PM
From EUR 6573.56
Overview
bookings / #492
5:43 PM – 5:43 PM
From EUR 6573.56
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/492" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/492" ); 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/492"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/492"
)
booking = res.json() Response
{
"id": 492,
"userId": 56,
"kind": "flight",
"referenceId": 314,
"checkInAt": "2027-04-21T17:43:47.760Z",
"checkOutAt": "2027-04-21T17:43:47.760Z",
"status": "pending",
"totalAmount": 6573.56,
"currency": "EUR",
"createdAt": "2027-03-31T17:43:47.760Z"
}