flowrise-hms / api
FlowRise HMS API module — RESTful endpoints and Scribe documentation
Requires
- php: ^8.4
- flowrise-hms/core: dev-main
- knuckleswtf/scribe: ^5.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
In one sentence: Optional REST API layer for mobile and third-party clients — Sanctum token authentication, Scribe documentation tooling, and the switch that turns on the domain REST endpoints registered by other modules.
Current status
Complete. Verified against code on 2026-11-24. See Module Status.
What is implemented
POST /api/v1/auth/login— email/password → Sanctum personal access token, optionally limited withabilities(clinical:read,billing:write, ...) and named withtoken_name(throttle:5,1)POST /api/v1/auth/logout— revoke the current token- The switch that registers every operational module's REST endpoints through
Modules\Core\Services\ApiRouteRegistrar(full list: API Reference) php artisan api:generate-docs(wrapsscribe:generate --force) and/docs(no login needed);GET /api/docsredirects there. The strategies inapp/Scribedocument resource controllers from their declarationstests/Feature/ApiDocumentationCoverageTest.phpfails when a/api/v1route has no Scribe group, no token scope, or no real authorisation rule
What is deferred
Endpoints left out on purpose and nested resources not covered yet are listed in the API Reference.
What happens if this module is disabled
The auth routes and every route registered through ApiRouteRegistrar disappear. The older Billing (/api/v1/billing/*) and Insurance (/api/v1/insurance/*) endpoints and FHIR (/api/v1/fhir/*) endpoints remain available from their own modules regardless of this module's status.
For FHIR R4 clinical exchange, use the FHIR module, not this module.
Dependencies
Modules\Core(declared inmodule.json)- Laravel Sanctum (host app;
SANCTUM_STATEFUL_DOMAINS,SANCTUM_TOKEN_PREFIX)
For developers
- Namespace:
Modules\Api\... - Service provider:
Modules\Api\Providers\ApiServiceProvider - Routes:
Modules/Api/routes/api.php(auth),routes/web.php(/api/docsredirect) - Branch scoping:
api.branch=Modules\Core\Http\Middleware\SetCurrentApiBranch(403 when the token owner has no branch) - Docs: API Administration, API Reference