example-data.com
Menu
Browse docs and collections

Overview

bookings / #28

Feb
25
Thu

hotel booking #28

11:44 AM – 11:44 AM

From JPY 129.83

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 28,
  "userId": 249,
  "kind": "hotel",
  "referenceId": 136,
  "checkInAt": "2027-02-25T11:44:44.284Z",
  "checkOutAt": "2027-03-01T11:44:44.284Z",
  "status": "cancelled",
  "totalAmount": 129.83,
  "currency": "JPY",
  "createdAt": "2026-12-16T11:44:44.284Z"
}