Get Cash flow at period

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

ParameterTypeRequiredDescription
periodstring (date-time)NoThe reference date-time used to determine the cash flow period. ISO 8601 format (e.g., 2024-01-01T00:00:00Z).
financialAccountIdstringNoThe 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.

FieldTypeDescription
cashIninteger (int64)Total cash inflows (credits) for the period, in cents.
cashOutinteger (int64)Total cash outflows (debits) for the period, in cents.
dateFromstring (date-time)Start of the cash flow period. Present when a period parameter is provided.
dateTostring (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

CodeWhen it happens
400Invalid period date-time format or malformed query parameter
401Token missing, expired, or invalid
403Insufficient permissions to access the specified financial account
404Financial account not found for the provided financialAccountId
500Internal server error

Common Mistakes

  • Providing period in a non-ISO 8601 format will result in a 400 error; always use the date-time format (e.g., 2024-06-01T00:00:00Z).
  • Omitting financialAccountId when 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/refresh before making requests to avoid 401 errors.

Related Endpoints

  • GET /api/financialAccounts — Retrieve the list of financial accounts for a customer, including financialAccountId values needed for this endpoint
  • GET /api/financialAccounts/{financialAccountId} — Get 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?period=2024-01-01T00%3A00%3A00Z&financialAccountId=fa_XXXXXXXXXX" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Query Params
date-time
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