API Reference
The Alhuda Travel ERP exposes its entire server API through a single handler monolith at
src/lib/api.ts (28,238 lines). This section documents every
route grouped by domain.
Start with Overview for the dispatch pattern, auth model, permission convention, idempotency rules, and the checklist for adding new routes.
Domains
- Overview — Monolith pattern,
apiFetch, auth, permissions, idempotency, error shape, how to add a route. - Authentication — Login, registration, partner + customer signup, OTP/2FA.
- Bookings, Groups & Sales — Booking CRUD, import, invoices, travel groups, group invoices, quotations, ops approvals, portal routes.
- Finance — Journals, payments, vouchers, GL accounts, periods, invoices, TDS, GST, financial reports.
- Customers, Partners & Suppliers — Customer CRUD, agent CRUD, supplier CRUD, leads, ledgers.
- Inventory — Hotels, food, ground transfers, airlines, quota blocks, FIT, B2B offers, visa, tickets.
- Admin, Approvals & System — Users, permissions, audit, communications, finance config, storage, settings.