v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Matching

Produce AI match-rule suggestions (human-review required)

Builds AGGREGATE, privacy-safe history features for the context, asks the AI advisor for config-only candidate rules, and enqueues each surviving candidate in a human-review queue. AI output is NEVER authoritative: producing a suggestion CREATES NO rule. A rule is created only when a human APPROVES a suggestion. The lane is gated by a global advisor kill-switch AND a per-tenant opt-in (fail-closed: a non-opted-in tenant gets 403). Tenant from the JWT, context from the path. The egress payload is aggregates only — no raw transaction, money, or PII.

post/v1/matching/contexts/{contextId}/rule-suggestions

Path parameters

contextIdstring uuid required

Context ID

Context ID

Response

OK

countinteger required

Number of suggestion reviews produced

Example response

{
  "count": 2,
  "items": [
    {
      "candidate": {
        "confidence": 0.82,
        "expectedImprovement": "+8% auto-match",
        "priority": 10,
        "rationale": "near-miss amounts cluster under 1%",
        "type": "TOLERANCE"
      },
      "contextId": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2026-06-16T10:30:00Z",
      "createdRuleId": "550e8400-e29b-41d4-a716-446655440000",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "rejectReason": "too aggressive",
      "reviewerId": "user-42",
      "status": "PENDING_REVIEW",
      "updatedAt": "2026-06-16T10:35:00Z",
      "version": 1
    }
  ]
}