example-data.com
Menu
Browse docs and collections

Overview

bookings / #147

Jun
6
Fri

hotel booking #147

12:12 PM – 12:12 PM

From AED 7939.54

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 147,
  "userId": 12,
  "kind": "hotel",
  "referenceId": 40,
  "checkInAt": "2025-06-06T12:12:59.534Z",
  "checkOutAt": "2025-06-09T12:12:59.534Z",
  "status": "pending",
  "totalAmount": 7939.54,
  "currency": "AED",
  "createdAt": "2025-04-18T12:12:59.534Z"
}