Skip to main content
Rules

Preview a rule against transactions (dry-run)

Accepts either a rule_id to load an existing rule, or an inline rule definition (conditions + actions). Provide an array of transaction_ids to test against — each transaction must belong to the authenticated user. No data is persisted.

POST
/rules/preview

Action values support Liquid templates for dynamic expressions. Use {{ transaction.field_name }} to reference fields and Liquid filters (remove, regex_capture, date_add, remove_at, keep_at, etc.) to transform values. Plain strings are treated as literal values.

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ruleobjectrequired

Inline rule definition (required when rule_id is absent)

rule_idinteger | null

The ID of an existing rule to preview. Omit to provide an inline rule definition instead.

transaction_idsstring[]required

The IDs of the transactions to preview the rule against. The transactions must belong to the authenticated user. Maximum 25 per request.

Required array length: 1 - 25

Response

application/json
missing_transaction_idsany[]required
resultsobject[]required