---
title: "Update Ledger Account"
method: PUT
path: "/ledger-accounts/{ledger_id}"
tags: ["accounting-settings"]
---

# Update Ledger Account

`PUT /ledger-accounts/{ledger_id}`

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

Partial manual correction of a ledger account (accountant, scoped) on the GL chart.

## Path parameters

- `ledger_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- LedgerAccountUpdate: ``PUT /ledger-accounts/{id}`` body (admin) — partial manual correction. Setting ``is_contra`` marks/clears the contra flag (Minusaktiven/Minuspassiven) — its normal balance side is the opposite of the section's natural side; presents as a negative reduction within its section; orthogonal to category. Toggling it does **not** retro-rewrite posted journal entries — it affects future booking + display only.
  - `account_name` string, nullable
  - `category` 'asset' | 'liability' | 'equity' | 'income' | 'expense' | 'tax' | 'other' | 'unknown': 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.
  - `is_contra` boolean, nullable
  - `account_number_guess` string, nullable

## Response `200`

Successful Response

- LedgerAccountResponse: ``POST/PUT /ledger-accounts/{id}`` → ``{"ledger_account": ...}``.
  - `ledger_account` LedgerAccountOut, required: One chart-of-accounts row.
    - `id` string, required
    - `company_id` string, required
    - `fiscal_year` integer, 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.
    - `is_profit_loss` boolean, required
    - `is_contra` boolean
    - `is_intentional` boolean
    - `account_number_guess` string, nullable
    - `first_seen_date` string, date, nullable
    - `last_seen_date` string, date, nullable
    - `journal_usage_count` integer, required
    - `sources` string[]
    - `created_at` string, date-time, required
    - `updated_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)
