Skip to content

Preview Rule

POST
/rules/preview
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.

Media typeapplication/json
RulePreview
object
account_ids
Any of:
Array<string>
amount_exact
Any of:
number
amount_max
Any of:
number
amount_min
Any of:
number
direction
Any of:
string
Allowed values: debit credit
effective_from
Any of:
string format: date
match_field
Any of:
string
Allowed values: payee description payee_or_description
match_mode
Any of:
string
Allowed values: equals prefix contains
match_text
Any of:
string
pair_account_a
Any of:
string format: uuid
pair_account_b
Any of:
string format: uuid
window_days
Any of:
integer
<= 14

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>
ValidationError
object
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"
}
]
}