Compliance API
Endpoints
GET /api/v1/compliance/journeys/:journeyId
GET /api/v1/compliance/users/:userId
GET /api/v1/compliance/events/:eventId
POST /api/v1/compliance/evaluate
POST /api/v1/compliance/events
GET /api/v1/admin/compliance/events
GET /api/v1/admin/compliance/rules
PATCH /api/v1/admin/compliance/rules/:ruleIdAccess
Restricted.
Journey compliance status:
{
"status": "ALLOW",
"policyVersion": "PILOT-0.1",
"evaluatedAt": "2026-09-30T07:20:00Z",
"checks": [
{ "code": "IDENTITY-001", "status": "PASS" },
{ "code": "VEHICLE-001", "status": "PASS" },
{ "code": "ROUTE-001", "status": "PASS" }
]
}The detailed check list — rule codes, evidence, risk level, internal reason codes — is available only to authorised administrative roles. A consumer client receives the status and an actionable message, not the engine's internal reasoning.
Exposing rule codes to ordinary users would tell a participant exactly which threshold they are being measured against, which invites working around the control rather than complying with it.
Evaluate
POST /api/v1/compliance/evaluateInternal service endpoint.
{
"journeyId": "uuid",
"matchId": "uuid",
"bookingId": "uuid"
}{
"decision": "ALLOW",
"riskLevel": "LOW",
"policyVersion": "PILOT-0.1",
"reasonCodes": []
}Implements evaluate(passenger, driver, vehicle, journey, request, match, policy). Returns a decision — ALLOW, REVIEW or BLOCK — with reasonCodes, riskLevel, policyVersion, ruleResults and evidence.
REVIEW is returned as a successful response, not an error. The evaluation succeeded; the activity was held.
Rules administration
GET /api/v1/admin/compliance/rules
PATCH /api/v1/admin/compliance/rules/:ruleIdRequires COMPLIANCE_ADMIN. Every change is audited and creates a new policy version rather than editing the active one in place — otherwise historical decisions stop being explainable.
