example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 10 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": 217,
      "userId": 83,
      "kind": "property",
      "referenceId": 23,
      "checkInAt": "2025-10-02T23:33:31.904Z",
      "checkOutAt": "2025-10-16T23:33:31.904Z",
      "status": "cancelled",
      "totalAmount": 9910.69,
      "currency": "CAD",
      "createdAt": "2025-08-06T23:33:31.904Z"
    },
    {
      "id": 218,
      "userId": 31,
      "kind": "flight",
      "referenceId": 115,
      "checkInAt": "2025-06-05T09:24:17.092Z",
      "checkOutAt": "2025-06-05T09:24:17.092Z",
      "status": "completed",
      "totalAmount": 3124.31,
      "currency": "AUD",
      "createdAt": "2025-04-02T09:24:17.092Z"
    },
    {
      "id": 219,
      "userId": 223,
      "kind": "property",
      "referenceId": 130,
      "checkInAt": "2026-10-01T04:13:34.263Z",
      "checkOutAt": "2026-10-03T04:13:34.263Z",
      "status": "cancelled",
      "totalAmount": 5139.83,
      "currency": "CAD",
      "createdAt": "2026-08-10T04:13:34.263Z"
    }
  ],
  "meta": {
    "page": 10,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=10&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=11&limit=24",
    "prev": "/api/v1/bookings?page=9&limit=24"
  }
}