Jun
9
Mon
hotel booking #322
4:04 PM – 4:04 PM
From SGD 3874.15
Overview
bookings / #322
4:04 PM – 4:04 PM
From SGD 3874.15
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/322" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/322" ); 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/322"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/322"
)
booking = res.json() Response
{
"id": 322,
"userId": 10,
"kind": "hotel",
"referenceId": 103,
"checkInAt": "2025-06-09T16:04:42.358Z",
"checkOutAt": "2025-06-18T16:04:42.358Z",
"status": "pending",
"totalAmount": 3874.15,
"currency": "SGD",
"createdAt": "2025-03-18T16:04:42.358Z"
}