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
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string (enum) | No | The 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). |
financialAccountId | string | No | The 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
| Field | Type | Description |
|---|---|---|
data | array of cashflowperiod | List of cash flow entries broken down by sub-period within the requested range. Nullable. |
total | cashflowperiod | Aggregate cash flow totals for the entire requested period. |
cashflowperiod object (extends cashflow)
| Field | Type | Description |
|---|---|---|
cashIn | integer (int64) | Total funds received (inflows) during the period, in the smallest currency unit (e.g., cents). |
cashOut | integer (int64) | Total funds spent or transferred out (outflows) during the period, in the smallest currency unit (e.g., cents). |
dateFrom | string (date-time) | Start date and time of the period segment (ISO 8601 format). |
dateTo | string (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
| Code | When it happens |
|---|---|
| 400 | Invalid period enum value supplied or malformed financialAccountId |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access the requested financial account |
| 404 | Financial account not found for the given financialAccountId |
| 500 | Internal server error |
Common Mistakes
- Passing an unrecognized string for
period(e.g.,"LAST_WEEK") instead of a valid enum value such asD7will result in a 400 error. - Omitting
financialAccountIdwhen 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. cashInandcashOutvalues 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/refreshbefore it expires to avoid 401 errors on long-running sessions.
Related Endpoints
GET /api/financialAccounts— List all financial accounts for a customerGET /api/financialAccounts/{financialAccountId}— Retrieve details for a specific financial accountGET /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"