KPI Matrix Reference Public

API Reference

Reference & Standards API Reference The KPI Matrix exposes two read-only JSON APIs: a client (integration) API for other systems, and an end-user API for an employee's own data…

Guide version: r1 Module version: 1.4.0 Updated: 2026-07-22 Estimated time: 3 min 1 views
Reference & Standards

API Reference

The KPI Matrix exposes two read-only JSON APIs: a client (integration) API for other systems, and an end-user API for an employee's own data. Both are read-only and both hide internal columns.

????
Not for browser use — these back integrations, dashboards and mobile/SPA clients. The in-app screens don't call them; they use their own internal endpoints. Both APIs reuse the exact same scoring services as the web UI, so their numbers always match what you see on screen.

Client (integration) API

Machine-to-machine, read-only, for trusted external systems. Prefix /api/v1/kpi, OAuth scope kpi:read.

PropertyValue
AuthBearer JWT + X-Company-Key (selects the tenant database)
Scopekpi:read — “KPI Matrix (Read)”
MethodsGET only
Missing record404 kpi_not_found
OpenAPIpublic/api/v1/openapi.json
EndpointReturns
GET /api/v1/kpi/cyclesall review cycles
GET /api/v1/kpi/cycles/{id}one cycle
GET /api/v1/kpi/templatesall templates
GET /api/v1/kpi/templates/{id}one template + its metrics
GET /api/v1/kpi/results?cycle_id=composite results for a cycle (defaults to the active cycle)
GET /api/v1/kpi/employees/{id}/scores?cycle_id=one employee's assignment + composite + scores by category
GET /api/v1/kpi/salary-recommendations?cycle_id=&status=salary recommendations, filterable
curl -H "Authorization: Bearer $TOKEN" \
     -H "X-Company-Key: $COMPANY_KEY" \
     "https://your-erpat-host/api/v1/kpi/results?cycle_id=12"

End-user API (self-service)

The JSON behind an employee's own KPI view — for a mobile app or SPA. Read-only and self-only: identity comes from the authenticated employee's token, and a request can never ask for another user's data. Prefix /v1/api/kpi.

PropertyValue
Identitythe authenticated employee (from the token — never a request parameter)
GuardsGET only · module module_kpi_matrix on · permit kpi_matrix
Module off404 module_unavailable (hides that it exists)
OpenAPIpublic/v1/api/openapi.json
EndpointReturns
GET /v1/api/kpi/my/scores?cycle_id=my assignment + composite + scores by category (defaults to active cycle)
GET /v1/api/kpi/my/historymy composite-score trend over cycles
GET /v1/api/kpi/my/assignmentsmy KPI assignments
GET /v1/api/kpi/my/salary-recommendation?cycle_id=my salary recommendation(s)
GET /v1/api/kpi/my/results/{cycle_id}my finalized results for a cycle (404 if none)
????
This end-user API is the programmatic twin of the KPIs profile tab — same data, same self-only access model.

Generating specs & Postman collections

php erpat api:openapi --postman      # client API: /api/v1/* OpenAPI spec + Postman
php erpat euapi:openapi --postman    # end-user API: /v1/api/* spec + Postman
⚠️
Both APIs are strictly read. There is no API to create a cycle, calculate, or approve a salary step — those actions are deliberately kept to the authenticated, permission-checked web UI so every change has a user and an audit trail.
????
Where next? See the access model these APIs enforce on Permissions & Roles, or the data shapes they return on The 29 Metrics and Scoring.
Was this guide helpful?

Report a content problem