---
title: "Close Posting Lineage"
method: POST
path: "/v1/tools/verify_close_posting_lineage"
tags: ["close-lineage", "acctech", "gl-coding", "accrual", "evidence-linkage", "close-readiness"]
---

# Close Posting Lineage

`POST /v1/tools/verify_close_posting_lineage`

## Request

- Base URL: `https://ainumbers.co`
- URL: `https://ainumbers.co/v1/tools/verify_close_posting_lineage`
- Auth: none declared

A month-end close lineage verdict over declared entries: GL coding entries and accrual entries in (lineage key, GL account, amount, optional source document digest, optional traces_to references), linkage structure out (accruals that resolve to a declared coding entry, accruals with no reference, every reference naming a key nothing declares, coding entries nothing traces to, coding entries with no source digest, repeated lineage keys, overall CLOSE_READY, GAPS_FOUND or INDETERMINATE). Four stages in one pure compute() per CLOSE-COMMAND-CENTER-BUILD-SPEC-2026-09-23.md section D2: intake with fail-closed shape validation, lineage key uniqueness, per accrual linkage classification, coding side observations and verdict. Unlinked accruals, dangling references and duplicate keys gate; orphan coding and missing source digests are advisory. The scope is the structure of declared linkage, never amount agreement. The spec's worked example is carried as the oracle-backed golden fixture (execution_hash 46b2cee4111553128514447ded7e205fb45bbdedccd75579f04c7ebc360d63d1).

**Tool URL:** https://ainumbers.co/chaingraph/art-692-close-posting-lineage.html
**AP2/Policy Mandate export:** yes

## Request body

- object
  - `as_of` string: Optional as-of date, YYYY-MM-DD; validated as a date string by the kernel whenever present, and never used as a clock.
  - `coding_entries` object[], required: Declared GL coding entries. May be empty; each entry must carry a non-empty key, a non-empty gl_account and a finite amount.
    - `key` string, required
    - `gl_account` string, required
    - `amount` number, required
    - `source_document_digest` string: Optional digest of the source document. Absent reads as no declared digest.
  - `accrual_entries` object[], required: Declared accrual entries. An empty list makes the register INDETERMINATE.
    - `key` string, required
    - `gl_account` string, required
    - `amount` number, required
    - `traces_to` string[], nullable: Coding entry keys this accrual claims to trace to. Absent or null reads as no reference.

## Response `200`

Successful tool execution result

- object
  - `linked_accruals` string[], required: Accrual keys whose every declared reference resolves to a declared coding entry, in input order. An accrual that partly resolves is not here.
  - `unlinked_accruals` string[], required: Accrual keys declaring no reference at all, in input order. Gates the verdict.
  - `dangling_trace_refs` object[], required: One entry per reference naming a key no coding entry declares, reported with the accrual that declared it. Gates the verdict.
    - `accrual_key` string, required
    - `trace_ref` string, required
  - `orphan_coding` string[], required: Coding entry keys no accrual traces to. Advisory: recorded, never gating.
  - `missing_source_refs` string[], required: Coding entry keys with no declared source_document_digest. Advisory: recorded, never gating.
  - `duplicate_lineage_keys` string[], required: Keys declared more than once across the coding and accrual entries together, once per colliding key in first-repeat order. Gates the verdict.
  - `overall` 'CLOSE_READY' | 'GAPS_FOUND' | 'INDETERMINATE', required: CLOSE_READY iff unlinked_accruals, dangling_trace_refs and duplicate_lineage_keys are all empty over a non-empty accrual set; INDETERMINATE on an empty or malformed register; GAPS_FOUND otherwise.
  - `errors` string[]: Present only on the indeterminate path, carrying the reason no linkage assertion was possible; non-empty exactly when the conditional compliance flag CLOSE_LINEAGE_INDETERMINATE is present (flag-mirror doctrine).

---

[API](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite.md) · [All operations](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/llms.txt) · [OpenAPI document](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/revisions/b462e4f5bb28?raw)
