---
title: "Gl Trial Balance"
method: GET
path: "/companies/{company_id}/gl/reports/trial-balance"
tags: ["gl"]
---

# Gl Trial Balance

`GET /companies/{company_id}/gl/reports/trial-balance`

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

Per-account debit/credit columns for one fiscal year, with totals.

``fiscal_year`` (year label) defaults to the latest year posted in; ``period_id``
narrows to one period of it. No all-years mode — account identity is
``(company, fiscal year, code)``, so aggregating double-counts silently (ZET-155).
Unknown year/period → 404; period outside the year → 422.

Cut by the line's stamped ``fiscal_year_id``, not its posting date;
``…/financial-statements`` cuts by posting date inside the same year's stored
window, so the two differ only on a line dated outside the year it is stamped to.
``fiscal_year_cut`` names the cut (ZET-166).

## Path parameters

- `company_id` string, required

## Query parameters

- `period_id` string, nullable
- `fiscal_year` integer, nullable

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- TrialBalanceOut
  - `lines` TrialBalanceLineOut[], required
    - `code` string, required
    - `name` string, required
    - `debit` string, required
    - `credit` string, required
  - `total_debit` string, required
  - `total_credit` string, required
  - `balanced` boolean, required
  - `fiscal_year` integer, nullable
  - `fiscal_year_cut` FiscalYearCutOut: How a statement decided which journal lines belong to the fiscal year (ZET-166). Two statement families cut the year differently, and a response must say which cut produced it — for an ordinary calendar-year book the two agree, but they diverge for a short/long fiscal year, after a ``fiscal_year_start_month`` change, or for any line dated outside the year it is stamped to: - ``"fiscal_year_id"`` (``/gl/reports/trial-balance`` / ``profit-and-loss`` / ``balance-sheet``) — a line is included because its **stamped** ``fiscal_year_id`` FK points at this fiscal year. ``date_from``/``date_to`` are that year's *calendar bounds*, informational only: a line dated outside them is still included when it is stamped to the year. ``period_id`` non-``None`` means the figures are further narrowed to that one fiscal period of the year, whose own bounds are ``period_date_from``.. ``period_date_to``. On these routes the descriptor is ``None`` for a company that has posted nothing (no year resolved, no cut applied). - ``"posting_date_window"`` (``GET /companies/{id}/financial-statements``) — a line is included because its ``posting_date`` falls inside a window derived **at read time** from the company's ``fiscal_year_start_month`` setting; ``date_from``/``date_to`` are that derived window and the descriptor is always present (the window resolves with or without data). A month-scoped read (``?month=``) aggregates the narrower ``period_start``..``period_end`` echoed beside this object (the balance sheet staying cumulative from ``date_from``).
    - `method` 'fiscal_year_id' | 'posting_date_window', required
    - `date_from` string, date, nullable
    - `date_to` string, date, nullable
    - `period_id` string, nullable
    - `period_date_from` string, date, nullable
    - `period_date_to` string, date, nullable

## 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)
