Read companies gl integrity
Changed onGenerated minimal contract (#1940): parameters, auth, and status codes are authoritative; see the route handler for the exact body/response shape. Enrichment tracked by the x-median-spec-stage marker. Read-only: runs the ledger integrity invariants and writes nothing. Returns companyId, range, ok, invariants (code, ok, violations, optional findings and summary) and totals. Every invariant runs unless codes names a subset. The bookkeeping agent's key may read it for a company the agent is enabled on (403 when it is not or when the company is patient-data restricted, 409 when the company's agent kill switch is on) and is sent counts only: companyId, range, ok, totals and, per invariant, code, ran, ok and violationCount (the number of violations a person sees for that check), with no violations, findings or summary. A check that could not run has ran false and null ok and violationCount; it is never reported as zero. The shared cloud-bookkeeping service token gets 404.
Request
- Base URLhttps://api.medianfi.com/api/v1
- AuthHTTP bearer
Path parameters
Query parameters
Start of the range for the range-scoped invariants (I6, I7, I10). Defaults to the earliest posted entry date.
End of the range for the range-scoped invariants. Defaults to today.
Comma-separated registered invariant codes (for example I1_balanced,I12_categoryFollowsLedger). When present only these invariants run; an unknown or empty value is refused with 422. Absent, every invariant runs.
Response
Success envelope; see the route handler for the payload shape
Changes
- info
added the new optional
queryrequest parametercodes - info
added the new optional
queryrequest parameterendDate - info
added the new optional
queryrequest parameterstartDate
2 more changes in this revision
- info