Suggest transaction category

POST https://app.speybooks.com/api/v1/transactions/{id}/suggest-category

Runs the categorisation rules engine against a transaction and returns a suggested account if a matching rule is found. The engine evaluates rules in priority order using the transaction description, reference, and Suspense line amount.

If matched, returns the suggested account details and the rule name. If no match is found, returns matched: false with the reason and evaluation evidence for debugging.

This is a read-only operation — it does not modify the transaction. Use the categorise endpoint to apply the suggestion.

Path parameters

id string required
Transaction ID (e.g. txn_42). Must use the transaction prefix.

Response

200 Returns a category suggestion with matched account and rule name, or indicates no match with the reason.
Show response fields
evidence object
Show child attributes
confidence string
matchedOn string
ruleType string
matched boolean
suggestion object
Show child attributes
accountCode string
accountId string
accountName string
ruleName string

Error codes

404 Transaction not found.