Mar
25
Thu
hotel booking #399
1:49 PM – 1:49 PM
From CAD 7313.37
Overview
bookings / #399
1:49 PM – 1:49 PM
From CAD 7313.37
Request
curl example
curl -sS \ "https://example-data.com/api/v1/bookings/399" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/bookings/399" ); 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/399"
);
const booking = (await res.json()) as Booking; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/bookings/399"
)
booking = res.json() Response
{
"id": 399,
"userId": 95,
"kind": "hotel",
"referenceId": 96,
"checkInAt": "2027-03-25T13:49:11.941Z",
"checkOutAt": "2027-04-05T13:49:11.941Z",
"status": "confirmed",
"totalAmount": 7313.37,
"currency": "CAD",
"createdAt": "2027-02-18T13:49:11.941Z"
}