---
title: "Build Balance Sheet From Gl"
method: POST
path: "/companies/{company_id}/balance-sheets/from-gl"
tags: ["accounting-settings"]
---

# Build Balance Sheet From Gl

`POST /companies/{company_id}/balance-sheets/from-gl`

## 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}/balance-sheets/from-gl`
- Auth: none declared

Build the closing balance sheet of a Zeno-closed FY from the posted GL (accountant).

The GL → snapshot bridge (gap #14, doc/pipeline.md §"Opening balances"): a company
that ran the year inside Zeno and sealed it produces the accepted prior-year
``balance_sheet_snapshot`` the opening-entries generator requires — no upload.
First sheet for the FY → ``accepted``; a different accepted sheet exists → a
``proposed`` snapshot + pending change set (consent in the change-set UI);
repeat click → hash-idempotent no-op (the existing snapshot is returned).
409 when the year is still open, the trial balance is unbalanced, or non-zero
unclassified accounts exist; 404 when the FY has no GL calendar.

## Path parameters

- `company_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- BalanceSheetFromGlIn: Request body of ``POST /companies/{id}/balance-sheets/from-gl`` (gap #14). ``fiscal_year`` is the **closed** source year whose posted GL becomes the closing balance-sheet snapshot (the opening-entries prerequisite for year N+1).
  - `fiscal_year` integer, required

## Response `201`

Successful Response

- BalanceSheetSnapshotOut: An immutable balance-sheet snapshot for a ``(company, fiscal_year)`` + its lines.
  - `id` string, required
  - `company_id` string, required
  - `fiscal_year` integer, required
  - `as_of_date` string, date, nullable
  - `currency` string, required
  - `status` 'accepted' | 'proposed' | 'superseded' | 'founding', required: Lifecycle of a balance-sheet snapshot. ``accepted`` is the single live snapshot per (company, fiscal_year); ``proposed`` is a consent-gated replacement awaiting the user's decision; ``superseded`` is a retired snapshot (replaced by a newer accepted one, or a discarded proposal). ``founding`` (ZCT-843) is a different KIND of sheet, not a lifecycle stage of a closing sheet: the founding balance sheet (Gründungsbilanz) a newly founded company's FIRST fiscal year opens from, filed under that year. It is deliberately a status value: every reader of "the accepted sheet of year N" — the consent lifecycle, the one-accepted-per-year index, the next year's opening, reconciliation, staleness — filters ``accepted``/``proposed``, so none of them can ever take a founding sheet for a closing one. At most one is live per company; a replacement marks it ``superseded``.
  - `source` string, required
  - `source_document_id` string, nullable
  - `totals` object
  - `snapshot_hash` string, required
  - `created_at` string, date-time, required
  - `superseded_at` string, date-time, nullable
  - `resolution_json` object, nullable
  - `equity_roles` object, nullable
  - `lines` BalanceSheetLineOut[]
    - `id` string, required
    - `snapshot_id` string, required
    - `account_number` string, required
    - `account_name` string, nullable
    - `category` 'asset' | 'liability' | 'equity' | 'income' | 'expense' | 'tax' | 'other' | 'unknown', required: The account-type axis of a ledger account (Swiss-KMU chart of accounts). Distinct from — but derived from — ``LineRole`` (the journal-line semantic role). ``unknown`` is the conservative default when classification can't decide; ``other`` covers genuinely ambiguous / closing (9xxx) accounts.
    - `amount_cents` integer, required
    - `sign_display` string, nullable
    - `side` 'credit' | 'debit', required
    - `is_contra` boolean
    - `needs_review` boolean, required
    - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
