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
| Name | Type | Description |
|---|---|---|
| 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 https://cotlet.dev/api/v1/pennylane/categories \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("pennylane", "list_categories") const result = await cotlet.call('pennylane', 'list_categories'); cotlet call pennylane list_categories Example response
{
"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
}