---
title: "Get Gl Account Ledger"
method: GET
path: "/companies/{company_id}/gl/accounts/{account_id}/ledger"
tags: ["gl"]
---

# Get Gl Account Ledger

`GET /companies/{company_id}/gl/accounts/{account_id}/ledger`

## 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/accounts/{account_id}/ledger`
- Auth: none declared

One account's ledger (Kontoauszug) — every booking that touched it, in date
order, with Soll/Haben and the running balance after each line (CompanyMember).

No fiscal-year parameter: the chart is FY-owned, so ``account_id`` already
fixes the year. Posted **and** reversed entries are included (a reversal is a
second posted entry, so both legs must show or the balance is wrong); drafts
are not. The running balance is carried across pages by the server —
``page_opening_balance`` enters this page's first row, while
``closing_balance``/``total_debit``/``total_credit`` describe the whole
window. 404 when the account is not this company's; 422 when ``date_from`` is later
than ``date_to``.

## Path parameters

- `company_id` string, required
- `account_id` string, required

## Query parameters

- `date_from` string, date, nullable
- `date_to` string, date, nullable
- `limit` integer
- `offset` integer

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- GlAccountLedgerOut: One account's ledger page + the balances that make the page readable. The running balance is cumulative and order-dependent, so the server — not the client — carries it across pages: ``page_opening_balance`` is the balance entering this page's first row (``opening_balance`` plus everything the offset skips), while ``closing_balance`` and the debit/credit totals always describe the **whole** window. ``opening_balance`` includes the year's opening entries, which are never rows and never in the totals (ZCT-877).
  - `account` GlAccountOut, required
    - `id` string, required
    - `company_id` string, required
    - `fiscal_year_id` string, required: The fiscal year whose chart this account belongs to. Chart identity is (company, fiscal_year, code) — each year owns its chart, so a request that omits ?fiscal_year returns every year's row for a code. Match on this field (or on the `fiscal_year` label beside it, or filter by ?fiscal_year) rather than picking a repeated code by created_at. A year's chart is cloned from the prior year ONCE, when that year's chart is first materialised — an account created afterwards exists only in the year that created it, and is carried into the next year by the year-end rollforward (ZET-266), not automatically.
    - `fiscal_year` integer, nullable: The year label of `fiscal_year_id` (e.g. 2026).
    - `code` string, required
    - `name` string, required
    - `account_class` string, required
    - `normal_side` string, required
    - `is_postable` boolean, required
    - `control_type` string, required
    - `currency` string, nullable
    - `is_active` boolean, required
    - `is_contra` boolean
    - `category` string, nullable
    - `is_intentional` boolean
    - `account_number_guess` string, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `fiscal_year_id` string, required
  - `base_currency` string, required
  - `date_from` string, date, nullable
  - `date_to` string, date, nullable
  - `opening_balance` string, required
  - `page_opening_balance` string, required
  - `closing_balance` string, required
  - `total_debit` string, required
  - `total_credit` string, required
  - `lines` GlAccountLedgerLineOut[]
    - `line_id` string, required
    - `line_no` integer, required
    - `journal_entry_id` string, required
    - `entry_no` integer, nullable
    - `entry_status` string, required
    - `entry_type` string, required
    - `origin` string, required
    - `posting_date` string, date, required
    - `document_date` string, date, nullable
    - `description` string, nullable
    - `entry_description` string, nullable
    - `currency` string, required
    - `amount_base` string, required
    - `amount_currency` string, required
    - `debit` string, required
    - `credit` string, required
    - `running_balance` string, required
    - `reversal_of_entry_id` string, nullable
    - `reversed_by_entry_id` string, nullable
    - `document_id` string, nullable
    - `document_filename` string, nullable
    - `source_module` string, nullable
    - `source_ref_type` string, nullable
    - `source_ref_id` string, nullable
  - `total` integer, required
  - `opening_missing` boolean, 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)
