Categorisation Rules
Categorisation rules automate the classification of bank import transactions. When a transaction's description, reference, amount, or contact matches a rule, the matching rule's target ledger account is suggested (or auto-assigned) for that transaction.
Rule sources and precedence
Three sources of rule apply, in this order of precedence:
Your own rules, created for your organisation, take priority. Seed rules, provided when your organisation is set up, apply next. Shared platform defaults, derived across many organisations, apply last. So a rule you create always wins over a seed rule or a platform default for the same transaction.
When more than one rule matches a transaction, the outcome is resolved deterministically: more specific operators and fields win first, then your assigned priority, then the earliest rule. The test endpoint returns a diagnostic describing why a given rule won.
Fields and operators
A rule matches one transaction field with one operator. The fields are
description, contact_name, amount, reference, and the
metadata keys metadata.category, metadata.project,
metadata.department, and metadata.tag. The operators are
contains, equals, starts_with, ends_with,
greater_than, less_than, and regex.
Endpoints
https://app.speybooks.com/api/v1/categorisation-rules/List categorisation rulesPOSThttps://app.speybooks.com/api/v1/categorisation-rules/Create categorisation rulePOSThttps://app.speybooks.com/api/v1/categorisation-rules/categorise-rowCreate rule from import categorisationGEThttps://app.speybooks.com/api/v1/categorisation-rules/globalList global consensus rules with tenant account resolutionPOSThttps://app.speybooks.com/api/v1/categorisation-rules/reorderReorder rules by updating prioritiesPOSThttps://app.speybooks.com/api/v1/categorisation-rules/testTest a value against categorisation rulesPATCHhttps://app.speybooks.com/api/v1/categorisation-rules/{id}Update categorisation ruleDELETEhttps://app.speybooks.com/api/v1/categorisation-rules/{id}Delete categorisation rule