example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 17 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": 385,
      "userId": 188,
      "kind": "property",
      "referenceId": 66,
      "checkInAt": "2026-01-28T21:48:07.010Z",
      "checkOutAt": "2026-02-11T21:48:07.010Z",
      "status": "completed",
      "totalAmount": 1015.4,
      "currency": "JPY",
      "createdAt": "2026-01-09T21:48:07.010Z"
    },
    {
      "id": 386,
      "userId": 129,
      "kind": "hotel",
      "referenceId": 16,
      "checkInAt": "2027-01-29T04:12:04.707Z",
      "checkOutAt": "2027-02-08T04:12:04.707Z",
      "status": "pending",
      "totalAmount": 5285.58,
      "currency": "EUR",
      "createdAt": "2026-12-26T04:12:04.707Z"
    },
    {
      "id": 387,
      "userId": 179,
      "kind": "flight",
      "referenceId": 323,
      "checkInAt": "2026-06-03T16:12:57.563Z",
      "checkOutAt": "2026-06-03T16:12:57.563Z",
      "status": "cancelled",
      "totalAmount": 3562.28,
      "currency": "AED",
      "createdAt": "2026-05-04T16:12:57.563Z"
    }
  ],
  "meta": {
    "page": 17,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=17&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=18&limit=24",
    "prev": "/api/v1/bookings?page=16&limit=24"
  }
}