Jan
24
Sun
hotel booking #396
4:47 AM – 4:47 AM
From AUD 8927.69
Overview
bookings / #396
4:47 AM – 4:47 AM
From AUD 8927.69
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/396" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/396" ); 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/396"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/396"
)
booking = res.json() Response
{
"id": 396,
"userId": 2,
"kind": "hotel",
"referenceId": 28,
"checkInAt": "2027-01-24T04:47:50.184Z",
"checkOutAt": "2027-01-31T04:47:50.184Z",
"status": "cancelled",
"totalAmount": 8927.69,
"currency": "AUD",
"createdAt": "2027-01-01T04:47:50.184Z"
}