Categorise a transaction

PATCHhttps://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 the VAT rate, VAT treatment, and contact on the line in the same request. The VAT treatment here is the VAT scheme classification (standard, reduced, zero, exempt, outside_scope, or reverse_charge), which is distinct from the calculation directive used when entering a transaction directly. If the transaction has no Suspense line, because it has already been categorised, the request is rejected.

Recategorising a line is recorded so that future category suggestions improve.

Path parameters

idstringrequired
Transaction ID (e.g. txn_42). Must use the transaction prefix.

Body parameters

accountIdstringrequired
Target account ID (e.g. acc_4000). The Suspense line will be moved to this account.
contactIdstringoptional
Optional contact ID (e.g. cont_3) to associate with the categorised line.
vatRatenumberoptional
VAT rate as percentage (e.g. 20). Optional.
vatTreatmentstringoptional
VAT treatment for this categorisation.
standardreducedzeroexemptoutside_scopereverse_charge

Response

200Transaction categorised. Returns the target account details.
Show response fields
accountobject
Show child attributes
codestring
idstring
namestring
categorisedboolean
idstring

Error codes

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