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

ParameterTypeRequiredDefaultDescription
date_fromstringYes-Start date (YYYY-MM-DD)
date_tostringYes-End date (YYYY-MM-DD)
accountsstringNoallComma-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

FieldTypeDescription
date_fromstringStart date of the report
date_tostringEnd date of the report

transactions

Array of daily transaction aggregates. Only dates with transactions are included.

FieldTypeDescription
account_idnumberAccount ID
datestringTransaction date (YYYY-MM-DD)
daily_inflownumberTotal inflows for the day (in base currency units)
daily_outflownumberTotal outflows for the day (in base currency units)
transaction_countnumberTotal number of transactions
inflow_countnumberNumber of transactions with inflows
outflow_countnumberNumber of transactions with outflows

all_accounts

Array of all non-archived accounts for the organization (regardless of filtering).

FieldTypeDescription
idnumberAccount ID
namestringAccount name
categorystringAccount category (bank or credit_card)

filtered_accounts

Array of accounts matching the accounts filter parameter (or all accounts if no filter applied).

FieldTypeDescription
idnumberAccount ID
namestringAccount name
categorystringAccount category (bank or credit_card)

Usage

This report is particularly useful for:

  1. Identifying missing statements - If you see gaps in dates for an account, you may be missing statement uploads
  2. Verifying data completeness - Check that all expected days have transactions
  3. Monitoring transaction volume - Track daily transaction counts across accounts
  4. 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

CodeDescription
400Missing required parameters (date_from and date_to)
400Invalid date format (must be YYYY-MM-DD)
400date_from is after date_to
401Invalid or missing API credentials
403API key lacks reports:read permission