Retrieving the List of available Categories

Some reports might return a category-id. This endpoint offers to retrieve a list of all categories with their names and parent relations.

This endpoint returns the default list of categories. If you want to define your own categories and their relations please contact us.

POST /insights/v1/categories/get HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>

There is no body-element needed for this request.

Response Structure of Category List

{
    "data": Array<CategoryApi>
}

data CategoryApi[], always present

The list of all categories with its name and parent relations.

CategoryApi

{
    "id":      String,
    "name":    String,
    "parents": Array<String>
}

id String, always present

The id of this category.

name String, always present

The name of the category, for e.g. "Income" or "Insurances"

parents String[], always present

A Category (like "Insurances") can be divided into other categories (like "Health insurance"). Those sub-categories might fit into many parents (e.g. "Insurances" and "Healthcare"). Categories without a parent are root-categories and show the parents field as an empty array.

Example Response

{
    "data": [
        {
            "id": "7a7e8a81-9447-533d-88a3-494d2ec14f09",
            "name": "Insurances",
            "parents": []
        },
        {
            "id": "62ca48cb-949d-593c-9e5d-657b2c36cafc",
            "name": "Health Insurance",
            "parents": [
                "7a7e8a81-9447-533d-88a3-494d2ec14f09"
            ]
        }
    ]
}

results matching ""

    No results matching ""