example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 21 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": 481,
      "userId": 162,
      "kind": "hotel",
      "referenceId": 37,
      "checkInAt": "2025-10-06T19:38:29.109Z",
      "checkOutAt": "2025-10-08T19:38:29.109Z",
      "status": "cancelled",
      "totalAmount": 9499.31,
      "currency": "AED",
      "createdAt": "2025-09-18T19:38:29.109Z"
    },
    {
      "id": 482,
      "userId": 26,
      "kind": "property",
      "referenceId": 17,
      "checkInAt": "2025-12-07T13:45:10.997Z",
      "checkOutAt": "2025-12-19T13:45:10.997Z",
      "status": "cancelled",
      "totalAmount": 4944.41,
      "currency": "EUR",
      "createdAt": "2025-11-12T13:45:10.997Z"
    },
    {
      "id": 483,
      "userId": 167,
      "kind": "flight",
      "referenceId": 236,
      "checkInAt": "2025-11-23T04:46:47.245Z",
      "checkOutAt": "2025-11-23T04:46:47.245Z",
      "status": "pending",
      "totalAmount": 6392.05,
      "currency": "EUR",
      "createdAt": "2025-10-05T04:46:47.245Z"
    }
  ],
  "meta": {
    "page": 21,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=21&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": null,
    "prev": "/api/v1/bookings?page=20&limit=24"
  }
}