Jul
24
Fri
hotel booking #2
4:54 PM – 4:54 PM
From USD 3662.35
Overview
bookings / #2
4:54 PM – 4:54 PM
From USD 3662.35
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/2" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/2" ); 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/2"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/2"
)
booking = res.json() Response
{
"id": 2,
"userId": 39,
"kind": "hotel",
"referenceId": 107,
"checkInAt": "2026-07-24T16:54:15.113Z",
"checkOutAt": "2026-07-31T16:54:15.113Z",
"status": "cancelled",
"totalAmount": 3662.35,
"currency": "USD",
"createdAt": "2026-05-21T16:54:15.113Z"
}