example-data.com
Menu
Browse docs and collections

Overview

bookings / #268

Apr
16
Fri

hotel booking #268

2:00 AM – 2:00 AM

From AUD 9347.58

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 268,
  "userId": 133,
  "kind": "hotel",
  "referenceId": 102,
  "checkInAt": "2027-04-16T02:00:39.729Z",
  "checkOutAt": "2027-04-21T02:00:39.729Z",
  "status": "completed",
  "totalAmount": 9347.58,
  "currency": "AUD",
  "createdAt": "2027-03-11T02:00:39.729Z"
}