Post chart accounts
post_chart_accountsPosts the workspace's events to one chart (chart_id) or to every chart (all: true), and applies the journal-entry declarations, voids and retirements registered for it (declarations: a set of registered_document_id, or all, the default). A registered chart is installed at its first post, under the chart_id register returned, then checked. One order, every time: install, then journal entries and voids (applied before this call returns), then judge and post, then retirements last (a retirement applies once its chart's post has finished, or at once when the chart has exceptions). A chart this post retires (its retirement among the declarations posted) is not judged: its entries apply and it retires, status retiring or retired. declarations names chart-space documents only; a registered statement or workspace declaration is refused (not_postable): use submit. Each chart is first checked against the data, without a model: every owned primary account with movements must be bound by a claim, every claim must bind an account a register statement in the workspace is about, and every owner must be a party. A chart that fails returns a chart_exception naming each problem and posts nothing; repair it with update_standard_chart, register the chart it returns, and post it again: the post installs that next version under the same chart_id, add-only. A chart that passes is queued (status posting) and judges every pending event once; follow it with wait_for_workspace_idle. A row lists bank_disagreements when a declared cash line has no bank movement of its own: the author voids, corrects or keeps the entry. unmatched_declarations names registered entries whose "chart" is no chart's name here. Charts pass or fail independently. Declare all of a period's journal entries first, then post once: each post with new chart-wide entries re-judges the chart's events; each row says about how many the post's declarations re-opened. Model-backed posting is metered; the check is not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | true installs every registered chart not yet posted, then posts every active chart. Exclusive with chart_id. | |
| chart_id | No | The chart to post: an installed chart, or one registered and not yet posted (register returned its chart_id), which this post installs. Exclusive with all. | |
| declarations | No | Registered journal-entry declarations, voids and retirements to apply with this post: an array of registered_document_id, or "all" (the default) for every one registered for the posted chart and not yet applied. | |
| workspace_tag | Yes | Active workspace id (the workspace_tag create_workspace and list_workspaces return). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| charts | Yes | One row per chart: chart_id, chart_name, status (posting, chart_exception, retiring or retired) and exceptions (each with exception, designator, account_id, events, first_date, last_date); installed (chart or next_version) when this post installed a registered chart or version; bank_disagreements and a bank_note when the book and the bank disagree: the lines of each conflict, numbered, whose declared cash lines compete for fewer bank movements (journal_entry_id, journal_line_id, entry_date, account_id, amount, bank_rows, declared_lines, unmatched, conflict); a posting chart adds reopened_by_declarations (about how many judged events the declarations it applied re-opened) and, when any were re-opened, a note. | |
| engine | Yes | Stamped engine build/version identity for the tool result. | |
| status | Yes | chart_posting. | |
| posting_count | Yes | Charts queued to post (status posting). | |
| workspace_tag | Yes | Workspace scoped by the tool call. | |
| retiring_count | Yes | Charts this post retires instead of judging (status retiring or retired). | |
| unmatched_note | No | With unmatched_declarations: what to do. | |
| exception_count | Yes | Charts refused with a chart_exception. | |
| unmatched_declarations | No | Present when any are: each registered declaration waiting for a post whose "chart" names no active or registered chart in the workspace, so no post applies it (registered_document_id, document_kind, chart, reason no_chart or retired_chart). Kept: a chart registered later under that name takes it. |