Expense Category Report

[deprecated] Please see our report generation as described here.

Build a report with grouped transactions by category. Each category will have a sum and count of all transaction for this category from the respective account.

This report can be requested via the Modular Report endpoint. Specific for this report are those options:

ReportOptions

{
    "only_main_category" : ?Boolean
}

only_main_category boolean, optional

Since transactions can fit into multiple categories, this option tells the report to only consider the single best fitting category. The default for this flag is false.

Response Structure of Expense Category Report

The generated report will be part of the modular report response.

{
    "type": "EXPENSE_CATEGORIES",
    "categories": Array<CategoryInfo>
}

type String, always present

The type always contains the value "EXPENSE_CATEGORIES" for this report.

categories CategoryInfo[], always present

List of all category found for the account with count and sum of the corresponding transactions.

CategoryInfo

{
    "id": String,
    "name": String,
    "count": Integer,
    "sum": Amount
}

id String, always present

The unique identifier of the category. Further details about a category will be provided by the Category List call.

name String, always present

Name of the category.

count Integer, always present

The number of transactions fitting this category.

sum Amount, always present

The sum of all transactions corresponding to this category.

Example request

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
    "report_days": 60,
    "reports": [        
        {
            "type": "EXPENSE_CATEGORIES",
            "options": {
                "only_main_category": true
            }
        }
    ]
}

Example response

{
    "data": {
        "accounts": [
            {
                "insights_account_id": "3b3d678f-66b7-4b23-a2a5-0bfd275e86a1",
                "reports": [
                     {
                        "type": "EXPENSE_CATEGORIES",
                        "categories": [
                            {
                                "id": "8f1f56e6-a312-454d-b0ee-e20350cb5c1c",
                                "name": "Bank charges",
                                "count": 4,
                                "sum": {
                                        "amount": 1438,
                                        "currency": "EUR"
                                    }
                            },
                            {
                                "id": "0723e731-132d-4f00-a655-d9768dddc9b3",
                                "name": "Health insurance",
                                "count": 1,
                                "sum": {
                                        "amount": 14527,
                                        "currency": "EUR"
                                    }
                            }
                        ]
                     }
                ]
            }
        ]
    }
}

results matching ""

    No results matching ""