Skip to main content

Categories

The chart of accounts: the income and expense tree every transaction is classified against.

CommandHTTPDescription
categories listGET /v1/categoriesList categories
categories createPOST /v1/categoriesCreate a category
categories getGET /v1/categories/{id}Get a category by ID
categories updatePATCH /v1/categories/{id}Update a category
categories deleteDELETE /v1/categories/{id}Delete a category

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 categories
kobana finance categories list --fields "id,company_id,name,parent_id,level"

# Get a category by ID
kobana finance categories get --params '{"id": "CATEGORIE_ID"}'

# Create a category
kobana finance categories create \
--json '{"company_id": "COMPANY_ID", "name": "NAME", "type": "debit"}'

# Update a category
kobana finance categories update \
--params '{"id": "CATEGORIE_ID"}' \
--json '{"name": "NAME", "type": "debit"}'

# Delete a category
kobana finance categories delete --params '{"id": "CATEGORIE_ID"}' --dry-run

Next steps​