Categorise a transaction

PATCH https://app.speybooks.com/api/v1/transactions/{id}/categorise

Moves the Suspense line (account 9999) on a bank import transaction to the specified target account. This is the primary workflow for categorising imported bank transactions.

Optionally set VAT rate, VAT treatment, and contact on the line in the same request. If the transaction has no Suspense line (already categorised), returns a 400 error.

The categorisation is logged in the match log for the rules engine feedback loop (TMADD Phase 4b). If the original auto- categorisation was incorrect, this creates a correction record.

Path parameters

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

Body parameters

accountId string required
Target account ID (e.g. acc_4000). The Suspense line will be moved to this account.
contactId string optional
Optional contact ID (e.g. cont_3) to associate with the categorised line.
vatRate number optional
VAT rate as percentage (e.g. 20). Optional.
vatTreatment string optional
VAT treatment for this categorisation.
standardreducedzeroexemptoutside_scopereverse_charge

Response

200 Transaction categorised. Returns the target account details.
Show response fields
account object
Show child attributes
code string
id string
name string
categorised boolean
id string

Error codes

400 No Suspense line found (already categorised), or invalid IDs.
404 Transaction or target account not found.