example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 3 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": 49,
      "userId": 188,
      "kind": "property",
      "referenceId": 82,
      "checkInAt": "2026-03-17T00:58:00.792Z",
      "checkOutAt": "2026-03-18T00:58:00.792Z",
      "status": "confirmed",
      "totalAmount": 1608.74,
      "currency": "SGD",
      "createdAt": "2026-01-04T00:58:00.792Z"
    },
    {
      "id": 50,
      "userId": 234,
      "kind": "property",
      "referenceId": 178,
      "checkInAt": "2026-06-06T00:45:18.517Z",
      "checkOutAt": "2026-06-10T00:45:18.517Z",
      "status": "cancelled",
      "totalAmount": 2915.36,
      "currency": "USD",
      "createdAt": "2026-03-18T00:45:18.517Z"
    },
    {
      "id": 51,
      "userId": 20,
      "kind": "hotel",
      "referenceId": 134,
      "checkInAt": "2026-05-12T23:38:45.104Z",
      "checkOutAt": "2026-05-19T23:38:45.104Z",
      "status": "cancelled",
      "totalAmount": 9774.01,
      "currency": "SGD",
      "createdAt": "2026-04-20T23:38:45.104Z"
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=3&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=4&limit=24",
    "prev": "/api/v1/bookings?page=2&limit=24"
  }
}