example-data.com
Menu
Browse docs and collections

bookings

bookings

Page 5 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": 97,
      "userId": 18,
      "kind": "flight",
      "referenceId": 163,
      "checkInAt": "2026-12-31T18:40:07.923Z",
      "checkOutAt": "2026-12-31T18:40:07.923Z",
      "status": "pending",
      "totalAmount": 80.18,
      "currency": "AED",
      "createdAt": "2026-11-03T18:40:07.923Z"
    },
    {
      "id": 98,
      "userId": 15,
      "kind": "hotel",
      "referenceId": 61,
      "checkInAt": "2025-06-29T21:51:24.276Z",
      "checkOutAt": "2025-07-02T21:51:24.276Z",
      "status": "completed",
      "totalAmount": 5886.28,
      "currency": "AUD",
      "createdAt": "2025-06-14T21:51:24.276Z"
    },
    {
      "id": 99,
      "userId": 5,
      "kind": "hotel",
      "referenceId": 80,
      "checkInAt": "2026-08-16T13:04:43.790Z",
      "checkOutAt": "2026-08-23T13:04:43.790Z",
      "status": "cancelled",
      "totalAmount": 8623.7,
      "currency": "GBP",
      "createdAt": "2026-06-05T13:04:43.790Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/bookings?page=5&limit=24",
    "first": "/api/v1/bookings?page=1&limit=24",
    "last": "/api/v1/bookings?page=21&limit=24",
    "next": "/api/v1/bookings?page=6&limit=24",
    "prev": "/api/v1/bookings?page=4&limit=24"
  }
}