Developers
OpenAPI
A machine-readable OpenAPI 3.1 spec is served from the API Worker itself. It is generated from the route definitions in apps/api/src/routes/*.ts, so it's always in sync with what's actually deployed.
Where to get it
Not yet deployed
BookFlow does not currently serve a machine-readable OpenAPI spec at
/api/openapi.yaml or /api/openapi.json. A spec is being authored against the route definitions in apps/api/src/routes/*.ts and will be added to the Worker in a follow-up release. Until then, the per-audience reference pages (Public API, Owner API, Customer API, Admin) are the canonical reference.What's in the spec
- Every public, owner, and customer endpoint
- Path parameters, query parameters, request bodies
- Response shapes (200, 4xx, 5xx)
- Authentication (Bearer JWT)
- Rate limit headers
- Error response shapes
Importing into Postman
- Open Postman, click "Import"
- Paste the URL
https://booking-api.netwit.ca/api/openapi.yaml - Postman generates a collection with one request per endpoint
- Set the
baseUrlvariable to your environment (prod or localhost) - Set the
tokenvariable fromPOST /api/auth/login
Importing into Insomnia
- Click "Create" → "Import from URL"
- Paste the OpenAPI URL
- Insomnia creates a request collection
- Set environment variables for
baseUrlandtoken
Generating a client
Use openapi-generator to produce a typed client in your language of choice:
npx @openapitools/openapi-generator-cli generate \
-i https://booking-api.netwit.ca/api/openapi.yaml \
-g typescript-fetch \
-o ./bookflow-client \
--additional-properties=supportsES6=trueOther supported generators include: typescript-node, python, go, java, kotlin, swift, ruby, php, csharp.
Verifying the spec
Once the spec ships, it will be validated at deploy time by a CI check against the route definitions.
Need a human?
Email hello@netwit.ca or call +1-604-206-8169. NetWit responds in 1 business day.