Maya Wealth Group Documentation

Internal guides and OpenAPI contracts for the Cloudflare Workers that power Maya Wealth Group products.

health.ts
openapi.json
const res = await fetch('/health')
const body = await res.json()
// { ok: true, service: 'venue' }

Internal documentation for the Cloudflare Workers that power Maya Wealth Group products.

Platform

How the Workers, service bindings, and product apps fit together.

Authentication

JWT actors, organisation scoping, and how clients call private APIs.

Services

What each API owns, from venue operations to training and expenses.

API reference

Interactive OpenAPI docs generated from each service's published spec.

Product sites and apps reach domain APIs through the public API gateway (API_GATEWAY_URL). Each private Worker exposes:

  • GET /health — liveness, no auth
  • GET /doc — OpenAPI JSON
  • GET /docs — Swagger UI
  • /v1 — versioned HTTP API on each service Worker

Services

ServiceBindingOwns
BillingBILLINGInvoices, payments, and billing records
BookingsBOOKINGSWorkshop bookings and scheduling
CommunicationsCOMMUNICATIONSOutbound communications and webhooks
CustomersCUSTOMERSCustomer accounts and contact details
DirectoryDIRECTORYOrganisations, people, locations, and login
EnquiryENQUIRYMarketing form submissions and outbound email
ExpenseEXPENSEExpenses and receipt capture
HRHREmployment records, shifts, attendance, contracts, and leave
ListingsLISTINGSTelcam Auto vehicle listings and media
PlanningPLANNINGWorkforce demand, eligibility, and schedules
PlaybooksPLAYBOOKSSOPs, recipes, and published operational knowledge
QuotesQUOTESJobs, quotes, evidence, signatures, and uploads
RaffleRAFFLERaffle campaigns and one entry per receipt
SignageSIGNAGEShops, screens, pages, and Pi devices
StockSTOCKPer-site count lists and stock takes
TicketsTICKETSIssue tracking, SLA, and webhooks
TrainingTRAININGSkills, certifications, and readiness
VenueVENUEBrands, checklists, and tasks

Endpoint documentation is generated from each Worker's OpenAPI spec. Each service page links to its interactive API reference. CI publishes updated specs from each API repository on push to main.


Calling an API

Login tokens come from Directory (orgId, actorId). Domain Workers resolve the caller's user type (admin, area-manager, manager, member) from Directory memberships. Development tokens may still include actorType. Error bodies follow the shared envelope on the Errors page.

curl -sS \
  -X GET \
  -H "Host: venue" \
  "https://api.mayawealth.co.uk/v1/health"

See Authentication and Errors before integrating a new client.