---
title: "Gl Profit And Loss"
method: GET
path: "/companies/{company_id}/gl/reports/profit-and-loss"
tags: ["gl"]
---

# Gl Profit And Loss

`GET /companies/{company_id}/gl/reports/profit-and-loss`

## 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/profit-and-loss`
- Auth: none declared

Revenue − expense → net result, for one fiscal year.

**Window** — same rules as the trial balance: ``fiscal_year`` defaults to the latest
posted year, ``period_id`` narrows to one period of it, unknown values are 404 and a
contradictory pair 422. A P&L is a **flow** statement, so no reading makes the sum
of every fiscal year a company's result — hence no all-years mode (ZET-155). Opening
batches post only to balance-sheet accounts, so they never enter this figure.

**The cut** — by the line's stamped ``fiscal_year_id`` FK, not by posting date; the
response's ``fiscal_year_cut`` says so (see the trial balance; ``null`` only for a
company that has posted nothing, ZET-166). For the full statement — per-account
sections, the year's own account names, the problems list and the cash flow — use
``GET /companies/{id}/financial-statements``, which cuts by a posting-date window
instead, so the two can disagree for a short/long or shifted fiscal year; this
route returns the three totals.

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

- ProfitAndLossOut
  - `revenue` string, required
  - `expense` string, required
  - `net_result` string, 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)
