example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 18 of 21.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/bookings?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/bookings?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/bookings";

const res = await fetch(
  "https://example-data.com/api/v1/bookings?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Booking>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/bookings",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 409,
      "userId": 121,
      "kind": "hotel",
      "referenceId": 123,
      "checkInAt": "2026-02-25T20:40:25.223Z",
      "checkOutAt": "2026-03-01T20:40:25.223Z",
      "status": "confirmed",
      "totalAmount": 3249.09,
      "currency": "SGD",
      "createdAt": "2025-12-31T20:40:25.223Z"
    },
    {
      "id": 410,
      "userId": 148,
      "kind": "flight",
      "referenceId": 184,
      "checkInAt": "2025-11-01T16:08:20.507Z",
      "checkOutAt": "2025-11-01T16:08:20.507Z",
      "status": "confirmed",
      "totalAmount": 9750.58,
      "currency": "SGD",
      "createdAt": "2025-10-05T16:08:20.507Z"
    },
    {
      "id": 411,
      "userId": 21,
      "kind": "hotel",
      "referenceId": 63,
      "checkInAt": "2026-08-14T10:46:53.219Z",
      "checkOutAt": "2026-08-24T10:46:53.219Z",
      "status": "pending",
      "totalAmount": 9744.08,
      "currency": "AUD",
      "createdAt": "2026-06-10T10:46:53.219Z"
    }
  ],
  "meta": {
    "page": 18,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=18&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=19&limit=24",
    "prev": "/api/v1/bookings?page=17&limit=24"
  }
}