Bind a statement to its bank account
well_bind_statement_accountBind a bank statement that waits for its bank account (status needs_account) to the account the member picked, then import the lines Well already read. Nothing is read again and the file is not uploaded again.
Pass the statement's document_id and exactly one of:
account_id: one of the workspace's bank accounts, picked by the member from a numbered list of their accounts.account_number: the account number the member typed for an account Well does not hold yet, for a bank that issues no IBAN (US, UK, Bermuda). Well finds or creates the account that carries it.iban: the IBAN the member typed for an account Well does not hold yet. Well checks it, and finds or creates the account that carries it.
Call it only after the member picked an account or typed its number. That answer is the consent: do not ask again. Never pick an account yourself, and never call it for a statement that is not needs_account.
Read status, the statement's import status after the bind:
imported: the lines are in Well.minted_count,matched_count,review_countandalready_present_countare the import's own counts; a missing count is unknown, never 0.needs_account: the bind did not resolve an account Well can import into. Say so in one line.duplicate,skippedorfailed: the statement leftneeds_accountwithout an import. Say which, in one line. Onsuccess: false, nothing was written:errorsays why (an account that is not in this workspace, a number or an IBAN that is not valid, or a number or an IBAN different from the one the statement prints).
It writes only inside Well.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iban | No | The IBAN the member typed, when the account is not in Well yet. | |
| account_id | No | The workspace bank account the member picked. | |
| document_id | Yes | The statement's document, as the import result or the follow-up task names it. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| account_number | No | The account number the member typed, for an account Well does not hold yet. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| status | No | ||
| success | Yes | ||
| document_id | No | ||
| minted_count | No | ||
| review_count | No | ||
| matched_count | No | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| already_present_count | No | ||
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |