Skip to main content

Developer Guide

BookingFlow is designed to be driven by humans and machines. The Operations API is a REST interface that exposes the same capabilities as the app — search availability, create bookings, manage rates and inventory, record electricity meter readings, generate invoices, and receive signed webhooks — so any AI assistant, script, or integration holding an API key can operate a park end-to-end.

What you can do with the API​

  • Search availability and price stays for any accommodation type and date range
  • Create and manage bookings with server-side inventory checks — the API cannot oversell or undercharge
  • Manage inventory — accommodation types, pitches, rates, and allocations
  • Record meter readings and generate electricity invoices in one idempotent call
  • Sync customers and documents with your own systems
  • Receive webhooks for every booking, payment, and invoice event

Getting started​

  1. Get an API key — keys are issued in the BookingFlow dashboard and shown exactly once. Treat them like passwords.
  2. Read the conventions — authentication, error envelopes, idempotency, pagination, expansion, metadata, and webhooks.
  3. Pick a resource from the reference below and start building.

API reference​

The full reference lives in the Operations API section:

ResourceWhat it covers
QuickstartFirst requests, curl, and the agent workflow (paste meter readings → generate invoices)
ConventionsAuthentication, errors, idempotency, pagination, expansion, metadata, webhooks
Accommodations · Caravans · PitchesInventory: what you sell and where guests stay
Availability · RatesSearch open capacity and manage pricing
Bookings · CustomersThe core booking lifecycle and guest records
StatsRead-only operational numbers: arrivals, departures, occupancy, revenue
Meter readings · InvoicesElectricity billing: readings in, invoices out
Events · Webhook endpointsSigned notifications for everything that happens

The machine-readable contract is the OpenAPI 3.1 specification in functions/openapi.yaml, which a route-drift test keeps in sync with the implemented Express routes.