v1
latestOpenAPI 3.1.02026-07-263644911022.4 KBSimulate a match rule against a context (read-only dry run)
Previews how a single rule — an existing configured rule (ruleId) OR an inline candidate rule (rule) — would match a context's unmatched transactions, WITHOUT committing anything. Returns the number of 1:1 groups the rule would form, a bounded sample of would-match pairs (each with a confidence score, a per-component rationale (the "why"), and matched composite keys), and the per-side unmatched counts. Powers the rule-authoring "will this rule actually match?" preview. Scope: scored by the deterministic rule engine over raw transaction amounts; it does NOT apply run-time fee normalization or the FX-variance band, and previews only 1:1 pairwise grouping (no 1:N/N:M allocation). Nothing is persisted; the tenant is taken from the JWT, never the body.
Request body
Example request
{
"rule": {
"type": "EXACT"
}
}Response
OK
Example response
{
"matchedGroups": 12,
"ruleId": "550e8400-e29b-41d4-a716-446655440000",
"ruleType": "EXACT",
"sample": [
{
"amountDelta": "0.00",
"left": {
"amount": "100.50",
"baseAmount": "100.50",
"currency": "USD",
"date": "2025-01-15T10:30:00Z",
"externalId": "INV-1234",
"id": "550e8400-e29b-41d4-a716-446655440000",
"sourceId": "550e8400-e29b-41d4-a716-446655440001"
},
"right": {
"amount": "100.50",
"baseAmount": "100.50",
"currency": "USD",
"date": "2025-01-15T10:30:00Z",
"externalId": "INV-1234",
"id": "550e8400-e29b-41d4-a716-446655440000",
"sourceId": "550e8400-e29b-41d4-a716-446655440001"
},
"score": 90,
"why": {
"amountMatch": true,
"currencyMatch": true,
"dateMatch": true,
"matchedKeys": [
{
"agreed": true,
"field": "payment_id"
}
],
"referenceScore": 1
}
}
],
"unmatchedLeft": 3,
"unmatchedRight": 5
}