example-data.com
Menu
Browse docs and collections

Overview

bookings / #343

Dec
8
Mon

flight booking #343

1:29 PM – 1:29 PM

From CAD 5003.40

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 343,
  "userId": 100,
  "kind": "flight",
  "referenceId": 45,
  "checkInAt": "2025-12-08T13:29:15.190Z",
  "checkOutAt": "2025-12-08T13:29:15.190Z",
  "status": "completed",
  "totalAmount": 5003.4,
  "currency": "CAD",
  "createdAt": "2025-10-08T13:29:15.190Z"
}