Topolo Docs Topolo Platform
Open workspace

Exclude a bank line

Leave a statement line out of the books (a duplicate, the bank's own noise). Nothing posts; the line is marked excluded and can be unmatched later.

Outcome

Leave a statement line out of the books (a duplicate, the bank's own noise). Nothing posts; the line is marked excluded and can be unmatched later.

Before you start

  • Verify the intended environment, authenticated identity and specifically approved organization context.
  • The published application permission is banking:write. Discover the exact granted canonical Books workspace and bind it separately from action input.
  • Approve the actual mutation, accounting inputs and any provider/recipient effects before CLI --confirm or MCP confirm:true. Fixture identifiers and simulated provider responses authorize no live operation.

Discover the target

topolo whoami --json
topolo actions get app_topolo_books.bank.lines.exclude --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.
  • lineId: Exact bank line.id from bank.lines.list; inspect its current matching state before mutation.

Request

POST /api/bank/lines/{lineId}/exclude

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

Input fields

FieldRequiredMeaningSchema and constraints
lineIdRequiredExact bank line.id from bank.lines.list; inspect its current matching state before mutation.{"type":"string","minLength":1}

Inspect nested fields and the complete input schema.

Effects

  • Marks the line excluded. Nothing posts to the ledger.

Interpret the response

Read $.line.id for the returned bank_line identifier. Empty collections and nullable fields do not discover a target.

Call app_topolo_books.bank.lines.list with matchStatus excluded.

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.bank.lines.exclude --data @payload.json --json
topolo actions plan app_topolo_books.bank.lines.exclude --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_books.bank.lines.exclude --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --confirm --detail --json

MCP tool and arguments for the first successful example:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_books.bank.lines.exclude",
    "input": {
      "lineId": "bl_np6pa4_1"
    },
    "resourceType": "workspace",
    "resourceId": "<exact granted workspace id>",
    "confirm": true,
    "detail": true
  }
}

Refused response · auth_error

Input · payload.json:

{
  "lineId": "bl_9c1"
}

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:

{
  "lineId": "bl_np6pa4_1"
}

Captured response · HTTP 200

{
  "line": {
    "id": "bl_np6pa4_1",
    "organization_id": "org_rec_muvnp6pa4",
    "workspace_id": "ws_rec_muvnp6pa4",
    "bank_account_id": "bk_main_np6pa4",
    "source": "statement",
    "provider_transaction_id": "tx-bl_np6pa4_1",
    "posted_on": "2026-06-03",
    "period_key": "2026-06",
    "amount_minor": -700,
    "currency": "GBP",
    "description": "SOFTWARE",
    "counterparty": null,
    "memo": null,
    "kind": null,
    "provider_status": null,
    "fingerprint": "fp-bl_np6pa4_1",
    "match_status": "excluded",
    "matched_event_id": null,
    "raw": null,
    "imported_at": "2026-06-30T00:00:00Z",
    "updated_at": "2026-10-05T19:42:17.931Z",
    "duplicate_of": null,
    "coded_account_id": null,
    "matched_document_id": null,
    "matched_payment_id": null,
    "reconciled_at": "2026-10-05T19:42:17.931Z",
    "reconciled_by": "usr_test",
    "coded_by_rule_id": null,
    "xero_coding": null
  }
}

HTTP 200. Call app_topolo_books.bank.lines.list with matchStatus excluded.

Verify the result

  • Call app_topolo_books.bank.lines.list with matchStatus excluded.

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.

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

Unmatch the line to lift the exclusion.

  • 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.
  • List bank accounts: List the bank accounts reported by connected banks, with cached balances and the ledger account each maps to. linkedOnly returns just the accounts pointed at a ledger account.
  • Unmatch a bank line: Put a line back to unmatched: a coding or transfer journal is reversed (both lines of a transfer return), an exclusion is lifted. A line matched to a document payment is refused, since the payment is the record.

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.