Mar
5
Fri
hotel booking #131
4:53 PM – 4:53 PM
From AUD 8669.40
Overview
bookings / #131
4:53 PM – 4:53 PM
From AUD 8669.40
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/131" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/131" ); 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/131"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/131"
)
booking = res.json() Response
{
"id": 131,
"userId": 169,
"kind": "hotel",
"referenceId": 81,
"checkInAt": "2027-03-05T16:53:40.273Z",
"checkOutAt": "2027-03-15T16:53:40.273Z",
"status": "completed",
"totalAmount": 8669.4,
"currency": "AUD",
"createdAt": "2027-02-13T16:53:40.273Z"
}