Introduction
Expense
Organisation-scoped expenses and receipt capture (Cloudflare Worker + D1, R2, and Workers AI).
siteId is an opaque id from the calling product. This service does not own locations, catalogue, orders, or equipment.
Authentication is required. User types: admin, area-manager, manager, member (from Directory memberships for service expense).
Amounts are stored and returned as integer pence.
What it owns
- Expense records in D1
- Receipt originals in R2
- Receipt extraction through Workers AI (confirm the draft before an expense is created)
What it does not own
Stack
Hono, Zod, OpenAPI, D1, R2, Workers AI. API base path /v1.
See the Expense API reference.