Reorder rules by updating priorities

POST https://app.speybooks.com/api/v1/categorisation-rules/reorder

Bulk-updates the priority of multiple rules in a single request. Accepts an array of { id, priority } pairs. All updates are applied atomically within a savepoint.

Priority values range from 0 to 999. Higher values are evaluated first within the same provenance level.

Body parameters

rules array<object> required
Show child parameters
id integer required
Rule ID.
priority integer required
New priority (0-999). Higher = evaluated first.

Response

200 Number of rules updated.
Show response fields
updated integer

Error codes

400 Invalid rules array or priority values.