example-data.com
Menu
Browse docs and collections

Overview

bookings / #406

Aug
11
Mon

hotel booking #406

8:27 PM – 8:27 PM

From GBP 4940.26

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/bookings/406" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/bookings/406"
);
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/406"
);
const booking = (await res.json()) as Booking;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/bookings/406"
)
booking = res.json()

Response

{
  "id": 406,
  "userId": 162,
  "kind": "hotel",
  "referenceId": 70,
  "checkInAt": "2025-08-11T20:27:08.185Z",
  "checkOutAt": "2025-08-12T20:27:08.185Z",
  "status": "pending",
  "totalAmount": 4940.26,
  "currency": "GBP",
  "createdAt": "2025-06-20T20:27:08.185Z"
}