Preview Rule
POST
/rules/preview
const url = 'https://example.com/rules/preview';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"account_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"amount_exact":1,"amount_max":1,"amount_min":1,"direction":"debit","effective_from":"2026-04-15","match_field":"payee","match_mode":"equals","match_text":"example","pair_account_a":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pair_account_b":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","window_days":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/rules/preview \ --header 'Content-Type: application/json' \ --data '{ "account_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "amount_exact": 1, "amount_max": 1, "amount_min": 1, "direction": "debit", "effective_from": "2026-04-15", "match_field": "payee", "match_mode": "equals", "match_text": "example", "pair_account_a": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pair_account_b": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "window_days": 1 }'Dry-run a rule over history before creating it.
With a predicate: how many live rows it matches, plus a small sample.
With pair_account_a and pair_account_b: a transfer_link rule for that
pair (amount_exact, effective_from and window_days narrow or widen
it) — links is exactly the count activating such a rule would ask you
to confirm, with a sample of the pairs it would link.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RulePreview
object
account_ids
Any of:
Array<string>
null
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Preview Rule Rules Preview Post
object
key
additional properties
any
Example generated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}