Balances Report

This report shows the latest balances of an account.

URL and Request Body Structure of a Balances Report

POST /insights/v1/reports/balances/create HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>
{
    "insights_consumer_id": String,
    "insights_account_ids": ?Array<String>,
    "excluded_insights_account_ids": ?Array<String>,
    "required_data_availability": ?Enum<'NONE', 'BALANCE_OR_AVAILABLE'>
}

insights_consumer_id String, required

The insights_consumer_id parameter identifies the consumer whose transactions are used to generate the report.

insights_account_ids String[], optional

The list of accounts, identified by the insights_account_id, which will filter all transactions from the consumer to only those accounts. If missing, all accounts of the insights_consumer_id will be used to generate the report(s). The insights_account_ids parameter must be empty if the excluded_insights_account_ids parameter is set.

excluded_insights_account_ids String[], optional

The list of insights_account_ids which will be excluded from the report generation. The excluded_insights_account_ids parameter must be empty if the insights_account_ids parameter is set.

required_data_availability Enum, optional

Defines minimum requirement for balance data that must be available for the given accounts. The default is BALANCE_OR_AVAILABLE.

  • BALANCE_OR_AVAILABLE - Either balance or available must be obtainable for every given account. If not, 400 Bad request will be returned.
  • NONE - Neither balance, available, limit nor reserved needs to be obtainable. If they are not, balance, available, limit and reserved will not be included in the response.

Response Structure of Balances Report

{
    "data": {
        "reports": Array<Balances>
    }
}

data.reports Balances[], always present

The list of reports generated depending on the requested parameters.

Balances

{
    "type": "BALANCES",
    "insights_consumer_id": String,
    "insights_account_ids": Array<String>,
    "balance": ?Amount,
    "available": ?Amount,
    "limit": ?Amount,
    "reserved": ?Amount,
    "refreshed_at": DateTime
}

type String, always present

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

insights_consumer_id String, always present

The insights_consumer_id is the consumer identifier for the account(s) used in this report.

insights_account_ids String, always present

The insights_account_ids is used to identify a specific account within Account Insights. For this report there will always only be a single entry in this list.

balance Amount, optional

The balance property holds the actual balance of the account.

available Amount, optional

The available property holds the amount that is available for a transfer.

limit Amount, optional

The limit property holds the amount that represents the overdraft for the account, the additional amount the consumer can withdraw beyond 0.

reserved Amount, optional

The reserved property holds the amount that is reserved for known future payments.

refreshed_at DateTime (String: "YYYY-MM-DDThh:mm:ss.sssZ), always present

The refreshed_at shows when the data for this account were last refreshed.

Example request

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1"
}

Example response

{
    "data": {
        "reports": [
            {                
                "type": "BALANCES",
                "insights_consumer_id": "e6c4c735-06ec-47f1-b80d-55f68bb436b2",
                "insights_account_ids": [
                    "3b3d678f-66b7-4b23-a2a5-0bfd275e86a1"
                ],
                "balance": {
                    "amount": 100000,
                    "currency": "EUR"
                },
                "available": {
                    "amount": 120000,
                    "currency": "EUR"
                },
                "limit": {
                    "amount": 30000,
                    "currency": "EUR"
                },
                "reserved": {
                    "amount": 10000,
                    "currency": "EUR"
                },
                "refreshed_at": "2021-06-15T09:22:02.523Z"
            }
        ]
    }
}

Example request: Required data availability

Neither balance or available are obtainable in this example

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
    "required_data_availability": "NONE"
}

Example response: Required data availability

{
    "data": {
        "reports": [
            {                
                "type": "BALANCES",
                "insights_consumer_id": "e6c4c735-06ec-47f1-b80d-55f68bb436b2",
                "insights_account_ids": [
                    "3b3d678f-66b7-4b23-a2a5-0bfd275e86a1"
                ],
                "refreshed_at": "2021-06-15T09:22:02.523Z"
            }
        ]
    }
}

results matching ""

    No results matching ""