API overview
API overview (CAP RPL)
Section titled “API overview (CAP RPL)”Audience: backend, frontend, qa
Status: specced
Owns: backend
Depends on: Domain entities, Lifecycle, Experience flows
Contract rule
Section titled “Contract rule”OpenAPI is the source of truth for HTTP APIs exposed to CAP clients (web, future mobile, tools). Frontend and other clients must not reverse-engineer screens or tickets for endpoints.
Until a backend OpenAPI artifact exists, this page is the contract-first placeholder: intended resource groups and domain mapping only.
Future artifact location
Section titled “Future artifact location”| Item | Convention |
|---|---|
| Spec file | Commit openapi.yaml (or openapi/openapi.yaml) in the CAP backend repo; optionally mirror or publish into this docs app |
| Docs embed | Later: Redoc / Swagger UI page under this api/ section linking that file |
| Auth | Shared JWT from Orchestrator; CAP validates locally |
Intended resource groups
Section titled “Intended resource groups”| Group | Domain use cases | Related modules / entities |
|---|---|---|
| Auth | Register, OTP verify, login, password reset | User · Auth module — may proxy Orchestrator |
| Identity | Start / complete NIN (or provider) verify; read verification state | User identity · Identity |
| Applications | CRUD draft, submit, status, amend on ATTENTION_REQUIRED |
Application · lifecycle |
| Trades | List trades / units (NOS) for application | Trade, Unit · Trades |
| Payment | Initiate / confirm centre payment | Payment · Payment |
| Evidence | Folder / evidence items; facilitator feedback | EvidenceFolder |
| Interview | Schedule, outcomes, appeal | Interview |
| Recommendations | Fetch LMS courses on gap outcome | Recommendation · Recommendations |
| Centres / Assessors | Centre onboarding, assignments, assessor vetting | Centre, Assessor |
gRPC CAP → LMS for recommendations is an integration contract, not necessarily part of the public OpenAPI; document it alongside the Recommendations group when implemented.
Error and status language
Section titled “Error and status language”API payloads and error codes should reuse lifecycle stage and status vocabulary where they describe application state. See lifecycle.
See also
Section titled “See also”- Backend overview
- Frontend overview
- How to contribute — API operation group template