Balance Over Time Report
This report shows the changes to an account balance over time.
URL and Request Body Structure of a Balance Over Time Report
POST /insights/v1/reports/balance-over-time/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>,
"report_days": ?Integer,
"from_date": ?Date,
"to_date": ?Date
}
The insights_consumer_id
parameter identifies the consumer whose transactions are used to generate the report.
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.
The list of insights_account_id
s 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.
This parameter offers to provide a timeframe without need to calculate dates. If the report_days
property is set, the parameters from_date
and to_date
will be derived from current day (today) minus the given number of days.
The timeframe for which the report should be generated can be set by specifying either the from_date
and to_date
parameters or this report_days
parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.
The from_date
parameter (in combination with the to_date
parameter) will be used as the inclusive start date for this timeframe.
The timeframe for which the report should be generated can be set by specifying either the from_date
and to_date
parameters or the report_days
parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.
The to_date
parameter (in combination with the from_date
parameter) will be used as the inclusive end date for this timeframe.
The timeframe for which the report should be generated can be set by specifying either the from_date
and to_date
parameters or the report_days
parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.
Response Structure of Balance Over Time Report
{
"data": {
"reports": Array<BalanceOverTime>
}
}
The list of reports generated depending on the requested parameters.
BalanceOverTime
{
"type": "BALANCE_OVER_TIME",
"insights_consumer_id": String,
"insights_account_ids": Array<String>,
"balances": Array<BalanceInfo>,
"from_date": Date,
"to_date": Date,
"refreshed_at": DateTime
}
The insights_consumer_id
is the consumer identifier for the account(s) used in this report.
The insights_account_ids
is used to identify a specific account within Account Insights.
Depending on type of report and requested account-settings this could be a list of ids.
List of balances for the account for each date in the given report-timeframe.
The starting date used to generate this report.
The refreshed_at
shows when the data for this account were last refreshed.
BalanceInfo
{
"date": Date,
"balance": Amount
}
Example request
{
"insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
"report_days": 3,
"reports": [
{
"type": "BALANCE_OVER_TIME"
}
]
}
Example response
{
"data": {
"reports": [
{
"type": "BALANCE_OVER_TIME",
"insights_consumer_id": "3b3d678f-66b7-4b23-a2a5-0bfd275e86a1",
"insights_account_ids": [
"3b3d678f-66b7-4b23-a2a5-0bfd275e86a1"
],
"balances" :
[
{
"date": "2020-10-18",
"balance":
{
"amount": 15400,
"currency": "EUR"
}
},
{
"date": "2020-10-19",
"balance":
{
"amount": 12137,
"currency": "EUR"
}
},
{
"date": "2020-10-20",
"balance":
{
"amount": 169758,
"currency": "EUR"
}
}
],
"refreshed_at": "2021-06-15T09:22:02.523Z"
}
]
}
}