example-data.com
Menu
Browse docs and collections

Overview

bookings / #5

Oct
20
Tue

hotel booking #5

10:43 PM – 10:43 PM

From EUR 688.25

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 5,
  "userId": 250,
  "kind": "hotel",
  "referenceId": 30,
  "checkInAt": "2026-10-20T22:43:41.844Z",
  "checkOutAt": "2026-10-22T22:43:41.844Z",
  "status": "pending",
  "totalAmount": 688.25,
  "currency": "EUR",
  "createdAt": "2026-08-07T22:43:41.844Z"
}