Get Cash Flow at Period
The GET /api/financialAccounts/cashFlow endpoint retrieves detailed cash flow data for a specified period. It provides a summary of cash inflows and outflows for a given financial account, enabling partners and their customers to track financial activity and analyze transaction trends over time.
Endpoint
GET /api/financialAccounts/cashFlow
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 to present cash flow summaries to customers within your application dashboard or reporting features. It is useful for helping customers understand their spending and income patterns over a specific time window. When a period is supplied, the response includes the calculated date range (dateFrom and dateTo) that defines the reporting window.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | string (date-time) | No | The reference date-time used to determine the cash flow period. ISO 8601 format (e.g., 2024-01-01T00:00:00Z). |
| financialAccountId | string | No | The unique identifier of the financial account to retrieve cash flow data for. If omitted, data may be aggregated across accounts. |
Response
200 OK
The response returns either a basic cash flow summary (cashflow) or a period-scoped cash flow summary (cashflowperiod). When the period parameter is supplied, the response includes dateFrom and dateTo in addition to the base fields.
| Field | Type | Description |
|---|---|---|
| cashIn | integer (int64) | Total cash inflows (credits) for the period, in cents. |
| cashOut | integer (int64) | Total cash outflows (debits) for the period, in cents. |
| dateFrom | string (date-time) | Start of the cash flow period. Present when a period parameter is provided. |
| dateTo | string (date-time) | End of the cash flow period. Present when a period parameter is provided. |
Basic cash flow response (no period parameter):
{
"cashIn": 520000,
"cashOut": 134500
}Period-scoped cash flow response (period parameter supplied):
{
"cashIn": 520000,
"cashOut": 134500,
"dateFrom": "2024-01-01T00:00:00Z",
"dateTo": "2024-01-31T23:59:59Z"
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Invalid period date-time format or malformed query parameter |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access the specified financial account |
| 404 | Financial account not found for the provided financialAccountId |
| 500 | Internal server error |
Common Mistakes
- Providing
periodin a non-ISO 8601 format will result in a 400 error; always use thedate-timeformat (e.g.,2024-06-01T00:00:00Z). - Omitting
financialAccountIdwhen the authenticated user has multiple financial accounts may return aggregated or unexpected results — always specify the account ID for precise reporting. - Cash amounts (
cashIn,cashOut) are returned as integers in cents; divide by 100 when displaying as currency to the end user. - The Bearer token expires after 10 minutes; refresh it via
POST /api/auth/refreshbefore making requests to avoid 401 errors.
Related Endpoints
GET /api/financialAccounts— Retrieve the list of financial accounts for a customer, includingfinancialAccountIdvalues needed for this endpointGET /api/financialAccounts/{financialAccountId}— Get 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?period=2024-01-01T00%3A00%3A00Z&financialAccountId=fa_XXXXXXXXXX" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"