example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 19 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": 433,
      "userId": 49,
      "kind": "property",
      "referenceId": 123,
      "checkInAt": "2026-02-04T21:49:36.125Z",
      "checkOutAt": "2026-02-10T21:49:36.125Z",
      "status": "cancelled",
      "totalAmount": 4846.96,
      "currency": "EUR",
      "createdAt": "2025-12-18T21:49:36.125Z"
    },
    {
      "id": 434,
      "userId": 12,
      "kind": "flight",
      "referenceId": 271,
      "checkInAt": "2026-06-13T17:56:03.255Z",
      "checkOutAt": "2026-06-13T17:56:03.255Z",
      "status": "cancelled",
      "totalAmount": 6257.62,
      "currency": "SGD",
      "createdAt": "2026-05-03T17:56:03.255Z"
    },
    {
      "id": 435,
      "userId": 242,
      "kind": "property",
      "referenceId": 159,
      "checkInAt": "2027-02-25T20:07:20.489Z",
      "checkOutAt": "2027-03-04T20:07:20.489Z",
      "status": "confirmed",
      "totalAmount": 1230.27,
      "currency": "GBP",
      "createdAt": "2027-01-19T20:07:20.489Z"
    }
  ],
  "meta": {
    "page": 19,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=19&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=20&limit=24",
    "prev": "/api/v1/bookings?page=18&limit=24"
  }
}