List categories

Categories you use to analyse transactions and invoices, with their group and direction.

GET https://cotlet.dev/api/v1/pennylane/categories

read

Returns every category with its label, its category group and an optional analytical code. Treasury categories have a direction of cash_in or cash_out; other categories have none. Read this before categorise_transaction so you only pick categories that exist. Pages hold 1 to 100 categories; pass next_cursor back as cursor for the next page.

Parameters

Parameters: list_categories
NameTypeDescription
category_group_id integer integer Only categories in this group.
limit integer integer 1 to 100. Default: 20.
cursor string string Next page cursor from the previous call.

Request

cURL
curl https://cotlet.dev/api/v1/pennylane/categories \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("pennylane", "list_categories")
Node.js
const result = await cotlet.call('pennylane', 'list_categories');
CLI
cotlet call pennylane list_categories

Example response

JSON

{
  "categories": [
    {
      "category_id": 59,
      "label": "Hosting",
      "category_group_id": 7,
      "direction": "cash_out",
      "analytical_code": null
    },
    {
      "category_id": 33,
      "label": "Bank fees",
      "category_group_id": 7,
      "direction": "cash_out",
      "analytical_code": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.