---
title: "Close Gl Period"
method: POST
path: "/companies/{company_id}/gl/periods/{period_id}/close"
tags: ["gl"]
---

# Close Gl Period

`POST /companies/{company_id}/gl/periods/{period_id}/close`

## 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/periods/{period_id}/close`
- Auth: none declared

Close a period and return it — accountant. Consequential, and forward-only.

**The same close as ``POST …/gl/periods/{period_id}/close-run``** (``gl_period_close_run``),
which carries the full contract — read it there. The two differ only in what they
return: this one the period, that one the close-run row.

In short: the default ``new_status=closed`` (and ``year_closed``) stops the period
accepting postings **entirely**, including documents ingested later and dated inside
it. Undoing that takes an explicit, reason-required reopen (``reopen_gl_period``,
recorded in the close-run ledger — ZET-161); it never happens as a side effect.
``new_status=soft_closed`` signals the period is finished while still accepting
postings. Leftover draft entries refuse any close of an open or soft-closed period,
a soft close included. Close when the period's work is actually done, never to mark
a job done.

409 ``conflict.closeRequiredItemsOpen`` while the period's close to-do list holds
``required`` work; pass ``acknowledge: {"codes": […], "reason": "…", "accounts":
{code: [params.accounts…]}}`` to close over it (an item naming accounts is covered only
for those listed). Identical to ``…/close-run`` in every respect but the response body.

## Path parameters

- `company_id` string, required
- `period_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- GlPeriodCloseRequest
  - `new_status` 'soft_closed' | 'closed' | 'year_closed': The statuses a close may move a period **to** (ZET-161). A strict subset of ``GlPeriodStatus``: the request schema used to advertise the full enum, so ``new_status="open"`` validated and then died with a 422 pointing at a reopen operation that did not exist. Reopening is its own operation (``POST …/gl/periods/{period_id}/reopen``), not a close target.
  - `reason` string, nullable
  - `acknowledge` CloseAcknowledgeIn: "These to-do items are open and we are closing anyway — because …". The soft gate (``closing.gate``), shaped after the VAT filing's ``acknowledge_dirty``: a close refuses while ``required`` work stands, unless the caller names each open code and says why. What was open and what was waved through is written into the audit row the close already creates, so the decision is recorded rather than silent.
    - `codes` string[]
    - `reason` string, required
    - `accounts` object: Per code, the accounts acknowledged (the item's params.accounts).

## Response `200`

Successful Response

- GlFiscalPeriodOut
  - `id` string, required
  - `company_id` string, required
  - `fiscal_year_id` string, required
  - `period_no` integer, required
  - `date_from` string, date, required
  - `date_to` string, date, required
  - `status` string, 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)
