example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 15 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": 337,
      "userId": 28,
      "kind": "property",
      "referenceId": 91,
      "checkInAt": "2026-12-05T15:47:37.284Z",
      "checkOutAt": "2026-12-14T15:47:37.284Z",
      "status": "completed",
      "totalAmount": 5187.85,
      "currency": "SGD",
      "createdAt": "2026-11-28T15:47:37.284Z"
    },
    {
      "id": 338,
      "userId": 136,
      "kind": "property",
      "referenceId": 77,
      "checkInAt": "2027-01-04T10:35:07.102Z",
      "checkOutAt": "2027-01-16T10:35:07.102Z",
      "status": "cancelled",
      "totalAmount": 4336.06,
      "currency": "AED",
      "createdAt": "2026-10-07T10:35:07.102Z"
    },
    {
      "id": 339,
      "userId": 232,
      "kind": "flight",
      "referenceId": 9,
      "checkInAt": "2026-08-19T04:40:48.518Z",
      "checkOutAt": "2026-08-19T04:40:48.518Z",
      "status": "confirmed",
      "totalAmount": 6333.04,
      "currency": "EUR",
      "createdAt": "2026-08-05T04:40:48.518Z"
    }
  ],
  "meta": {
    "page": 15,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=15&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=16&limit=24",
    "prev": "/api/v1/bookings?page=14&limit=24"
  }
}