example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 20 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": 457,
      "userId": 21,
      "kind": "property",
      "referenceId": 110,
      "checkInAt": "2026-02-20T09:35:42.638Z",
      "checkOutAt": "2026-02-25T09:35:42.638Z",
      "status": "pending",
      "totalAmount": 6484.01,
      "currency": "CAD",
      "createdAt": "2025-12-23T09:35:42.638Z"
    },
    {
      "id": 458,
      "userId": 111,
      "kind": "property",
      "referenceId": 80,
      "checkInAt": "2026-05-10T16:50:36.711Z",
      "checkOutAt": "2026-05-24T16:50:36.711Z",
      "status": "confirmed",
      "totalAmount": 5623.21,
      "currency": "CAD",
      "createdAt": "2026-03-22T16:50:36.711Z"
    },
    {
      "id": 459,
      "userId": 181,
      "kind": "hotel",
      "referenceId": 6,
      "checkInAt": "2025-07-17T00:10:47.854Z",
      "checkOutAt": "2025-07-28T00:10:47.854Z",
      "status": "cancelled",
      "totalAmount": 7289.37,
      "currency": "EUR",
      "createdAt": "2025-05-31T00:10:47.854Z"
    }
  ],
  "meta": {
    "page": 20,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=20&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=21&limit=24",
    "prev": "/api/v1/bookings?page=19&limit=24"
  }
}