accounting-settings

List Autopost Decisions

Recent AI-accountant autonomy decisions (CompanyMember) — the activity feed.

Shows what the autonomy policy posted (posted), would have posted in assist shadow mode (shadow), or held for human review (held). ai_no_match shadow rows (one per AI-consulted bank entry with no verdict) are feed noise and hidden by default; include_no_match=true surfaces them for audit. outcome / source_ref_id narrow server-side (ZET-75), so the held-review surfaces can see held rows beyond the newest-limit window.

Newest first, ordered (created_at DESC, id DESC). limit caps at 200 and offset walks the rest (R2-21): one fiscal year of a mid-size client makes more decisions than one page holds, so page with offset += limit until a call returns fewer than limit rows. The response is a bare list.

cause keeps the held rows of one hold cause. An agent may accept only rows with agent_acceptable true.

get/companies/{company_id}/autopost-decisions

Request

  • Base URL: https://app.zeno-works.ch (the document declares no server; this is the origin it was published from)
  • URL: https://app.zeno-works.ch/companies/{company_id}/autopost-decisions
  • Auth: none declared

Path parameters

company_idstring required

Query parameters

limitinteger
offsetinteger
include_no_matchboolean
outcome'posted' | 'held' | 'shadow'

Outcome recorded for one autonomy decision (gl_autopost_decision).

posted — auto mode, policy cleared, entry was posted (AI). held — policy did not clear; nothing posted, falls back to human review. shadow — assist mode, policy would have posted but did not (shadow).

source_ref_idstring nullable
cause'not_a_decision' | 'expense_receipt' | 'autonomy_off' | 'post_failed' | 'period_closed' | 'amount_cap' | 'credit_note' | 'duplicate_suspicion' | 'self_counterparty' | 'card_statement' | 'payroll_liability_review' | 'vat_uncertainty' | 'fx_untranslated' | 'risk_flags' | 'open_questions' | 'proposal_rejected' | 'missing_original' | 'settlement_mismatch' | 'recognition_schedule' | 'pre_llm_guard' | 'low_confidence' | 'fy_predates_books' | 'fy_gap' | 'unknown_vat_code' | 'currency_mismatch' | 'bank_history' | 'bank_suspense' | 'awaiting_review' | 'unclassified'

Why a decision is sitting in the held tier.

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Response

Successful Response

idstring required
source_keystring required
outcome'posted' | 'held' | 'shadow' required

Outcome recorded for one autonomy decision (gl_autopost_decision).

posted — auto mode, policy cleared, entry was posted (AI). held — policy did not clear; nothing posted, falls back to human review. shadow — assist mode, policy would have posted but did not (shadow).

acceptableboolean
agent_acceptableboolean
refusal'unrelated' | 'card_statement' | 'credit_note' | 'ar_reminder' | 'no_document_date' nullable
reasonstring required
causestring nullable
cause_paramsobject nullable
effective_min_confidencestring required
confidencestring nullable
match_qualitystring nullable
amount_centsinteger nullable
source_ref_typestring nullable
source_ref_idstring nullable
journal_entry_idstring nullable
journal_entry_reversedboolean
receipt_waived_bystring nullable
receipt_waived_atstring date-time nullable
created_atstring date-time required
accepted_bystring nullable
accepted_by_namestring nullable
accepted_atstring date-time nullable
accepted_by_kind'human' | 'system' | 'ai' | 'api' | 'mcp' | 'chat'

What KIND of actor posted a journal entry — the attribution flag.

Two axes in one vocabulary, because the column answers one question — can a reader take this as a person's own judgement?

Authorship — the value says who composed the booking:

  • ai = the AI-accountant composed it (an autonomous post, or a one-click accept where the content is still the accountant's proposal);
  • system = a mechanical/background SystemPrincipal post (migrations, close automation, deterministic seeds).

Channel — the value says which surface a person's own action arrived through, because "a UserPrincipal acted" is NOT the same claim as "a person decided". All four are derived from the request edge by :func:~invoiage_db.repos.gl_posting._resolve_origin:

  • human = an interactive browser session (cookie/JWT auth). The only value that asserts a person was looking at the screen;
  • mcp = an API-key request carrying the mcp shell's X-Zeno-Surface marker — a connected agent, which MAY be relaying a person and may not;
  • api = any other API-key request (a script, an integration, an agent calling the REST api directly). Not provably a person either;
  • chat = the built-in CFO chat relaying a person's approval in-app. Its authored bookings stamp ai; chat is only for the relay.

Widening this vocabulary is a one-way door on rollback: the PG type is a native enum converted at load (pg_enums._pg_enum), so an api whose Python enum lacks a value raises LookupError reading any row that carries it. See the 0112 migration.

proposal_kindstring nullable
receipt_route'card' | 'claim' nullable
source_labelstring nullable
questionsstring[] nullable
advisoriesstring[] nullable
precedent_accountsstring[] nullable
accountant_metadataobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.