Topolo Docs Topolo Platform
Open workspace

Get bank summary

Every bank, card and cash account with what moved through it in the range (money in, money out, net), how many statement lines are still unmatched and their value, the ledger account it maps to, and the latest balance the bank reported.

Outcome

Every bank, card and cash account with what moved through it in the range (money in, money out, net), how many statement lines are still unmatched and their value, the ledger account it maps to, and the latest balance the bank reported.

Before you start

  • Verify the intended environment, authenticated identity and specifically approved organization context.
  • The published application permission is banking:read. Discover the exact granted canonical Books workspace and bind it separately from action input.

Discover the target

topolo whoami --json
topolo actions get app_topolo_books.reports.bank_summary.get --detail --json
topolo resources topolo-books --json
topolo workspaces list topolo-books --json
  • Set BOOKS_WORKSPACE_ID to the exact granted workspace returned by discovery.

Request

GET /api/reports/bank-summary

Inspect and test this action. Save the reviewed input as payload.json; supply credential/resource context separately.

Input fields

FieldRequiredMeaningSchema and constraints
fromOptionalfrom{"type":"string","pattern":"^\d{4}-\d{2}-\d{2}$"}
toOptionalto{"type":"string","pattern":"^\d{4}-\d{2}-\d{2}$"}

Inspect nested fields and the complete input schema.

Effects

  • Reads bank accounts and statement lines without changing anything.

Interpret the response

Read $.rows[].bankAccountId for the returned bank_account identifier. Empty collections and nullable fields do not discover a target.

No verification needed for a read. unmatched counts match app_topolo_books.bank.lines.list with matchStatus unmatched for the same range.

Inspect the success schema. CLI/MCP add their own transport envelope; CLI --detail requests the full result.

Worked examples

Actual Books route handlers and the exported Worker were exercised against five local SQLite D1 concern databases with all committed migrations, the real posting Durable Object and local R2. Route captures use synthetic verified Auth; Worker captures use synthetic Auth transports. Nexus, Brand, Notify, Pay, Mercury and Xero responses are explicitly simulated at the provider transport boundary. Captures prove local request/response behavior and canonical SDK projection, not live bank access, payment movement, email delivery, provider eligibility, tax compliance, encrypted custody, scheduled execution, deployment or production completion. Fixture identities, credentials, addresses and records authorize no live operation.

Run a reviewed request

Save the input from the selected worked example as payload.json. Validate and inspect the plan before calling the action; refused examples demonstrate errors and are not instructions to execute.

CLI:

topolo actions validate app_topolo_books.reports.bank_summary.get --data @payload.json --json
topolo actions plan app_topolo_books.reports.bank_summary.get --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_books.reports.bank_summary.get --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --detail --json

MCP tool and arguments for the first successful example:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_books.reports.bank_summary.get",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<exact granted workspace id>",
    "detail": true
  }
}

Refused response · auth_error

Input · payload.json:

{
  "from": "2026-06-01",
  "to": "2026-06-30"
}

Captured response · HTTP 401

{
  "error": "API key validation failed"
}

HTTP 401. SDK error code auth_error. Authenticate in the intended organization again. Verify whoami and the exact Books application/workspace binding before retrying; do not switch identity to work around a refusal.

Successful response · HTTP 200

Input · payload.json:

{}

Captured response · HTTP 200

{
  "from": "2026-04-01",
  "to": "2026-10-05",
  "baseCurrency": "GBP",
  "rows": []
}

HTTP 200. No verification needed for a read. unmatched counts match app_topolo_books.bank.lines.list with matchStatus unmatched for the same range.

Refused response · forbidden

Input · payload.json:

{}

Captured response · HTTP 403

{
  "error": "forbidden"
}

HTTP 403. SDK error code forbidden. The credential lacks permission or the resource is outside its scope. Compare the published action permission and discovered workspace binding; obtain the appropriate authorization before another call.

Verify the result

  • No verification needed for a read. unmatched counts match app_topolo_books.bank.lines.list with matchStatus unmatched for the same range.

Errors and recovery

  • auth_error (HTTP 401): Authenticate in the intended organization again. Verify whoami and the exact Books application/workspace binding before retrying; do not switch identity to work around a refusal.
  • forbidden (HTTP 403): The credential lacks permission or the resource is outside its scope. Compare the published action permission and discovered workspace binding; obtain the appropriate authorization before another call.

These are observed local refusals. Shared authentication, schema validation and resource authorization can also refuse before the route. Preserve the actual error, details and request id.

Recovery boundary

Repeat a read in the same authorized context; no state is changed.

  • List bank lines: List statement lines, filtered by account, match status or date, searched across description, counterparty, memo and the bank's transaction id, and sorted by posted date, amount, description or match status. Newest first unless you say otherwise; linkedOnly restricts them to accounts linked to a ledger account.
  • Update bank account mapping: Set the nickname and the ledger account (asset or liability) a bank account maps to. Everything else about the account is the bank's.
  • Get trial balance: Every account holding a balance at the date, each on one side only: debitMinor carries a debit balance, creditMinor a credit balance, and the other is zero. Accounts that net to nothing are left out. totalDebitMinor and totalCreditMinor are the sums of those balances and must agree, which is what balanced reports. These are balances, not turnover: they do not add up everything ever posted to an account, which would count both sides of every entry and count an expense again when a year-end close reverses it.

Evidence

Actual Books route handlers and the exported Worker were exercised against five local SQLite D1 concern databases with all committed migrations, the real posting Durable Object and local R2. Route captures use synthetic verified Auth; Worker captures use synthetic Auth transports. Nexus, Brand, Notify, Pay, Mercury and Xero responses are explicitly simulated at the provider transport boundary. Captures prove local request/response behavior and canonical SDK projection, not live bank access, payment movement, email delivery, provider eligibility, tax compliance, encrypted custody, scheduled execution, deployment or production completion. Fixture identities, credentials, addresses and records authorize no live operation.