example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 16 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": 361,
      "userId": 58,
      "kind": "property",
      "referenceId": 22,
      "checkInAt": "2025-09-26T02:18:08.401Z",
      "checkOutAt": "2025-10-07T02:18:08.401Z",
      "status": "completed",
      "totalAmount": 1958.24,
      "currency": "USD",
      "createdAt": "2025-09-14T02:18:08.401Z"
    },
    {
      "id": 362,
      "userId": 83,
      "kind": "property",
      "referenceId": 13,
      "checkInAt": "2025-11-12T19:18:08.301Z",
      "checkOutAt": "2025-11-25T19:18:08.301Z",
      "status": "pending",
      "totalAmount": 6424.63,
      "currency": "SGD",
      "createdAt": "2025-09-29T19:18:08.301Z"
    },
    {
      "id": 363,
      "userId": 29,
      "kind": "flight",
      "referenceId": 190,
      "checkInAt": "2026-06-20T22:33:15.448Z",
      "checkOutAt": "2026-06-20T22:33:15.448Z",
      "status": "completed",
      "totalAmount": 1255.89,
      "currency": "AUD",
      "createdAt": "2026-04-23T22:33:15.448Z"
    }
  ],
  "meta": {
    "page": 16,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=16&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=17&limit=24",
    "prev": "/api/v1/bookings?page=15&limit=24"
  }
}