Analytics
Overview
Two read-only services sitting on the same synced store as Transaction History, pre-computed during the sync. They answer "what did our cash position look like last month" without you pulling every transaction and aggregating it yourself.
| Service | Answers |
|---|---|
| CashflowAnalytics | What came in and went out each day, with totals |
| BalanceAnalytics | What the balance opened and closed at each day |
Both take the same parameters, neither paginates, and both inherit the sync's limits: toDate caps at T-1, and data starts from the account's onboarding date.
A synced day with no activity comes back with zero values. A missing date means the sync has not completed or has failed — the same caveat as Transaction History, with the same lack of a self-service way to check which dates are present.
Prerequisites
- Authentication: Obtain an access token using the OAuth2 Client Credentials flow (see Getting Started → Authentication). Every endpoint in this product takes
Authorization: Bearer <ACCESS_TOKEN>— there are no exceptions. - Subscription: Subscribe to Analytics in your chosen environment.
A token carries only the scopes you asked for, so one issued for a different product is rejected here. Request this product's scope, or ask for several scopes in a single token as described on the Authentication page.
Errors
Both services share the failure shape used across Statements: category and errors appear only on failure, and the category determines the HTTP status.
| Status | Codes | Cause |
|---|---|---|
400 ERROR_CATEGORY_VALIDATION_FAILED | INVALID_IBAN, INVALID_ACCOUNT, INVALID_BANK_CODE, ACCOUNT_NOT_FOUND | Bad IBAN, unknown bankCode, missing or malformed fromDate, toDate after T-1 |
401 ERROR_CATEGORY_AUTH_FAILED | AUTH_FAILED, CREDENTIALS_NOT_FOUND, UNAUTHORIZED | Token missing or expired |
404 ERROR_CATEGORY_NOT_FOUND | NOT_FOUND | Account not found, or not onboarded for Transaction History |
500 ERROR_CATEGORY_SYSTEM_FAILURE | SYSTEM_ERROR, INTERNAL_ERROR | Gateway-side failure |
503 ERROR_CATEGORY_TEMPORARY_FAILURE | SERVICE_UNAVAILABLE | Service temporarily unavailable |