example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 13 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": 289,
      "userId": 18,
      "kind": "property",
      "referenceId": 11,
      "checkInAt": "2026-07-06T18:42:40.180Z",
      "checkOutAt": "2026-07-07T18:42:40.180Z",
      "status": "pending",
      "totalAmount": 3566.38,
      "currency": "EUR",
      "createdAt": "2026-04-19T18:42:40.180Z"
    },
    {
      "id": 290,
      "userId": 84,
      "kind": "flight",
      "referenceId": 219,
      "checkInAt": "2027-02-11T17:11:18.331Z",
      "checkOutAt": "2027-02-11T17:11:18.331Z",
      "status": "cancelled",
      "totalAmount": 5119.07,
      "currency": "AED",
      "createdAt": "2026-12-25T17:11:18.331Z"
    },
    {
      "id": 291,
      "userId": 123,
      "kind": "flight",
      "referenceId": 326,
      "checkInAt": "2027-01-15T16:29:35.453Z",
      "checkOutAt": "2027-01-15T16:29:35.453Z",
      "status": "confirmed",
      "totalAmount": 7254.42,
      "currency": "JPY",
      "createdAt": "2026-10-18T16:29:35.453Z"
    }
  ],
  "meta": {
    "page": 13,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=13&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=14&limit=24",
    "prev": "/api/v1/bookings?page=12&limit=24"
  }
}