Create rule from import categorisation
POST
https://app.speybooks.com/api/v1/categorisation-rules/categorise-rowCreates a categorisation rule from an import-preview decision. The
description is normalised and a keyword extracted, and a rule with
operator contains is created (or updated if one already exists)
pointing at the chosen account.
Optionally pass batchDescriptions with the other rows in the
current import batch. The response then includes similarRowIds,
the IDs of rows whose extracted keyword matches, so the UI can
offer to categorise them together.
Body parameters
descriptionstringrequiredRaw transaction description from the import row. A keyword will be extracted and normalised for the rule.
targetAccountIdstringrequiredTarget account ID (e.g. acc_4000) for this categorisation.
batchDescriptionsarray<object>optionalOptional: other descriptions in the current import batch. Used to find similar rows that would match the same extracted keyword.
Show child parameters
descriptionstringrequiredRaw description for similarity matching.
rowIdintegerrequiredRow index in the import batch.
Response
200Created/upserted rule with extracted keyword, resolved account, and list of similar row IDs in the batch.
Show response fields
accountobjectShow child attributes
codestringidstringnamestringkeywordstringnormalisedValuestringruleobjectShow child attributes
actionstringidintegernamestringsimilarRowIdsarray<integer>Error codes
400Invalid input: missing description or target account ID.
404Target account not found.