List categories
const url = 'https://app.commitly.com/api/categories/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.commitly.com/api/categories/ \ --header 'Authorization: Bearer <token>'Returns the categories of the company as a plain JSON array. Not paginated.
is_obsolete:false= active,true= archived.is_category:true= budgets and transactions can be mapped to this category. Use only such categories when creating budgets.is_default: marks system categories that cannot be mapped. Do not use them for creating budgets.is_aggregating:truefor categories that aggregate other categories.- A category whose
idis not theparentof any other category is a leaf category.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”List of categories.
object
ID of the parent category.
Display position.
false = active, true = archived.
true = budgets and transactions can be mapped to this category.
true for categories that aggregate other categories.
Marks system categories that cannot be mapped. Do not use them for creating budgets.
Example
[ { "id": 1001, "parent": null, "name": "Change in liquid funds", "slug": "change-in-liquid-funds", "description": "", "order": 6, "is_obsolete": false, "is_category": false, "is_aggregating": true, "is_default": false }, { "id": 1002, "parent": 1001, "name": "Revenue", "slug": "revenue", "description": "", "order": 1, "is_obsolete": false, "is_category": true, "is_aggregating": false, "is_default": false }]The access token is invalid or has expired. Request a new token. The message is
localized (see Accept-Language).
object
Error message.
Present only if the company’s edition does not include the function; value billing_plan_permission_denied.
Example
{ "detail": "Invalid token."}Headers
Section titled “Headers”Authentication scheme, Bearer.
Example
BearerNo access token was sent, or the credentials are not allowed to call this
endpoint. If the company’s COMMITLY edition does not include the requested
function, the body additionally contains
"code": "billing_plan_permission_denied".
object
Error message.
Present only if the company’s edition does not include the function; value billing_plan_permission_denied.
Example
{ "detail": "User must be authenticated to access this resource."}
