Data Coverage Report
GET /api/v1/reports/data-coverage
Returns daily transaction counts aggregated by account over a date range. This endpoint provides the same data as the Data Coverage Report in the web UI, helping you identify missing transaction data by showing which days have transactions for each account.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|
| date_from | string | Yes | - | Start date (YYYY-MM-DD) |
| date_to | string | Yes | - | End date (YYYY-MM-DD) |
| accounts | string | No | all | Comma-separated account IDs to filter |
Example Request
curl -X GET "https://statements.finopsbricks.com/api/v1/reports/data-coverage?date_from=2024-01-01&date_to=2024-01-31&accounts=1,2" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Response
{
"data": {
"period": {
"date_from": "2024-01-01",
"date_to": "2024-01-31"
},
"transactions": [
{
"account_id": 1,
"date": "2024-01-01",
"daily_inflow": 5000.00,
"daily_outflow": 2000.00,
"transaction_count": 10,
"inflow_count": 3,
"outflow_count": 7
},
{
"account_id": 1,
"date": "2024-01-02",
"daily_inflow": 3000.00,
"daily_outflow": 1500.00,
"transaction_count": 8,
"inflow_count": 2,
"outflow_count": 6
},
{
"account_id": 2,
"date": "2024-01-01",
"daily_inflow": 2000.00,
"daily_outflow": 1000.00,
"transaction_count": 5,
"inflow_count": 2,
"outflow_count": 3
}
],
"all_accounts": [
{
"id": 1,
"name": "Main Business Account",
"category": "bank"
},
{
"id": 2,
"name": "Business Credit Card",
"category": "credit_card"
}
],
"filtered_accounts": [
{
"id": 1,
"name": "Main Business Account",
"category": "bank"
},
{
"id": 2,
"name": "Business Credit Card",
"category": "credit_card"
}
]
}
}
Response Fields
period
| Field | Type | Description |
|---|
| date_from | string | Start date of the report |
| date_to | string | End date of the report |
transactions
Array of daily transaction aggregates. Only dates with transactions are included.
| Field | Type | Description |
|---|
| account_id | number | Account ID |
| date | string | Transaction date (YYYY-MM-DD) |
| daily_inflow | number | Total inflows for the day (in base currency units) |
| daily_outflow | number | Total outflows for the day (in base currency units) |
| transaction_count | number | Total number of transactions |
| inflow_count | number | Number of transactions with inflows |
| outflow_count | number | Number of transactions with outflows |
all_accounts
Array of all non-archived accounts for the organization (regardless of filtering).
| Field | Type | Description |
|---|
| id | number | Account ID |
| name | string | Account name |
| category | string | Account category (bank or credit_card) |
filtered_accounts
Array of accounts matching the accounts filter parameter (or all accounts if no filter applied).
| Field | Type | Description |
|---|
| id | number | Account ID |
| name | string | Account name |
| category | string | Account category (bank or credit_card) |
Usage
This report is particularly useful for:
- Identifying missing statements - If you see gaps in dates for an account, you may be missing statement uploads
- Verifying data completeness - Check that all expected days have transactions
- Monitoring transaction volume - Track daily transaction counts across accounts
- Spotting anomalies - Days with unusually high or low transaction counts may indicate issues
Notes
- Only dates with at least one transaction are included in the
transactions array
- Dates without transactions will not appear in the results
- Accounts are ordered alphabetically by name
- Transactions are ordered by date (ascending), then by account (ascending)
- All monetary values are in base currency units (not cents/paise)
- Only non-archived accounts are included
Errors
| Code | Description |
|---|
| 400 | Missing required parameters (date_from and date_to) |
| 400 | Invalid date format (must be YYYY-MM-DD) |
| 400 | date_from is after date_to |
| 401 | Invalid or missing API credentials |
| 403 | API key lacks reports:read permission |