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.

ServiceAnswers
CashflowAnalyticsWhat came in and went out each day, with totals
BalanceAnalyticsWhat 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 B2B Unified Product in your chosen environment; it covers all seven B2B Unified products.

All seven B2B Unified products share one scope, b2b_unified. Request it once and the same token works here and on the other six; the Authentication page shows how.


Errors

Both services share the failure shape used across Statements: category and errors appear only on failure, and the category determines the HTTP status.

StatusCodesCause
400 ERROR_CATEGORY_VALIDATION_FAILEDINVALID_IBAN, INVALID_ACCOUNT, INVALID_BANK_CODE, ACCOUNT_NOT_FOUNDBad IBAN, unknown bankCode, missing or malformed fromDate, toDate after T-1
401 ERROR_CATEGORY_AUTH_FAILEDAUTH_FAILED, CREDENTIALS_NOT_FOUND, UNAUTHORIZEDToken missing or expired
404 ERROR_CATEGORY_NOT_FOUNDNOT_FOUNDAccount not found, or not onboarded for Transaction History
500 ERROR_CATEGORY_SYSTEM_FAILURESYSTEM_ERROR, INTERNAL_ERRORGateway-side failure
503 ERROR_CATEGORY_TEMPORARY_FAILURESERVICE_UNAVAILABLEService temporarily unavailable