Get Cash flow at period

Get Cash Flow at Period

The GET /api/financialAccounts/cashFlow/v2 endpoint retrieves cash flow data for a specified period, providing a comprehensive view of inflows and outflows of cash across a customer's financial accounts. The response includes period-by-period breakdowns as well as aggregate totals, enabling in-depth analysis of cash flow patterns over a chosen timeframe.

Endpoint

GET /api/financialAccounts/cashFlow/v2

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when you need to present a cash flow summary to a customer — for example, powering a dashboard widget that shows money in versus money out over the last 7 days, the current month, or year-to-date. It is useful for financial health monitoring, budgeting features, and trend analysis across any of a customer's active financial accounts.

Query Parameters

ParameterTypeRequiredDescription
periodstring (enum)NoThe time period for the cash flow report. Accepted values: None, D7 (last 7 days), M1 (last 1 month), M6 (last 6 months), Y1 (last 1 year), QTD (quarter-to-date), YTD (year-to-date).
financialAccountIdstringNoThe unique identifier of the financial account to scope the report to. If omitted, the report may aggregate across all accessible accounts.

Response

200 OK

The response contains a cashflowreport object with a data array of period segments and a total object summarizing the full requested period.

cashflowreport object

FieldTypeDescription
dataarray of cashflowperiodList of cash flow entries broken down by sub-period within the requested range. Nullable.
totalcashflowperiodAggregate cash flow totals for the entire requested period.

cashflowperiod object (extends cashflow)

FieldTypeDescription
cashIninteger (int64)Total funds received (inflows) during the period, in the smallest currency unit (e.g., cents).
cashOutinteger (int64)Total funds spent or transferred out (outflows) during the period, in the smallest currency unit (e.g., cents).
dateFromstring (date-time)Start date and time of the period segment (ISO 8601 format).
dateTostring (date-time)End date and time of the period segment (ISO 8601 format).
{
  "data": [
    {
      "cashIn": 250000,
      "cashOut": 87500,
      "dateFrom": "2026-05-01T00:00:00Z",
      "dateTo": "2026-05-07T23:59:59Z"
    },
    {
      "cashIn": 315000,
      "cashOut": 102300,
      "dateFrom": "2026-05-08T00:00:00Z",
      "dateTo": "2026-05-14T23:59:59Z"
    }
  ],
  "total": {
    "cashIn": 565000,
    "cashOut": 189800,
    "dateFrom": "2026-05-01T00:00:00Z",
    "dateTo": "2026-05-14T23:59:59Z"
  }
}

Error Codes

CodeWhen it happens
400Invalid period enum value supplied or malformed financialAccountId
401Token missing, expired, or invalid
403Insufficient permissions to access the requested financial account
404Financial account not found for the given financialAccountId
500Internal server error

Common Mistakes

  • Passing an unrecognized string for period (e.g., "LAST_WEEK") instead of a valid enum value such as D7 will result in a 400 error.
  • Omitting financialAccountId when a customer has multiple financial accounts may return aggregated data across all accounts rather than account-specific data; always supply this parameter when a scoped view is intended.
  • cashIn and cashOut values are returned in the smallest currency unit (cents for USD). Divide by 100 before displaying dollar amounts to end users.
  • The Bearer token expires after 10 minutes. Ensure your integration refreshes the token via POST /api/auth/refresh before it expires to avoid 401 errors on long-running sessions.

Related Endpoints

  • GET /api/financialAccounts — List all financial accounts for a customer
  • GET /api/financialAccounts/{financialAccountId} — Retrieve details for a specific financial account
  • GET /api/financialAccounts/transactions — Retrieve individual transactions for a financial account

Example

curl -X GET "https://api.banking.netevia.dev/api/financialAccounts/cashFlow/v2?period=M1&financialAccountId=fa_XXXXXXXXXX" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Query Params
string
enum
Allowed:
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json