Apr
6
Tue
hotel booking #272
5:11 PM – 5:11 PM
From AUD 5679.13
Overview
bookings / #272
5:11 PM – 5:11 PM
From AUD 5679.13
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/272" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/272" ); 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/272"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/272"
)
booking = res.json() Response
{
"id": 272,
"userId": 117,
"kind": "hotel",
"referenceId": 44,
"checkInAt": "2027-04-06T17:11:14.290Z",
"checkOutAt": "2027-04-16T17:11:14.290Z",
"status": "cancelled",
"totalAmount": 5679.13,
"currency": "AUD",
"createdAt": "2027-03-19T17:11:14.290Z"
}