Skip to main content

Automatic rules

The rules that classify transactions on their own, evaluated in the order they sit in. reorder is what changes that order.

CommandHTTPDescription
automatic-rules listGET /v1/automatic-rulesList automatic rules
automatic-rules createPOST /v1/automatic-rulesCreate an automatic rule
automatic-rules getGET /v1/automatic-rules/{id}Get an automatic rule by ID
automatic-rules updatePATCH /v1/automatic-rules/{id}Update an automatic rule
automatic-rules deleteDELETE /v1/automatic-rules/{id}Delete an automatic rule
automatic-rules reorder createPOST /v1/automatic-rules/reorderReorder automatic rules

Examples​

--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# List automatic rules
kobana finance automatic-rules list \
--fields "id,company_id,scope,position,active"

# Get an automatic rule by ID
kobana finance automatic-rules get --params '{"id": "AUTOMATIC_RULE_ID"}'

# Create an automatic rule
kobana finance automatic-rules create \
--json '{"company_id": "COMPANY_ID", "scope": "transactions"}'

# Update an automatic rule
kobana finance automatic-rules update \
--params '{"id": "AUTOMATIC_RULE_ID"}' \
--json '{"active": true, "account_id": "ACCOUNT_ID", "transaction_type": "debit"}'

# Delete an automatic rule
kobana finance automatic-rules delete \
--params '{"id": "AUTOMATIC_RULE_ID"}' \
--dry-run

Next steps​