---
title: "Apply Industry Template"
method: POST
path: "/companies/{company_id}/ledger-accounts/apply-industry-template"
tags: ["accounting-settings"]
---

# Apply Industry Template

`POST /companies/{company_id}/ledger-accounts/apply-industry-template`

## 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}/ledger-accounts/apply-industry-template`
- Auth: none declared

Apply the company's industry chart template to one fiscal year's chart (accountant).

The explicit recovery for a chart that predates its industry (ZET-157) or that
cannot post to both sides (ZET-262). Existing rows are never renamed or
re-categorized; only absent codes are seeded. The AR revenue default is
re-pointed only when it is unset or still the untouched base default, and only
once every open year's chart carries a usable target row (the setting is
company-wide).

``scope`` selects what is applied:

- ``"overlay"`` (default) — the industry overlay's own accounts (3400/4400/1280
  for services, and so on). **422** when the company has no industry or its
  industry resolves to the base chart — checked before the year resolves, so it
  wins over 404.
  This scope seeds the overlay's own rows, which **do include balance-sheet
  accounts** — 1280/1700 for IT, 1200 for trade, 1600/2451 for real estate.
- ``"template"`` — the resolved template's **profit-and-loss accounts only**, base
  included, and no balance-sheet rows at all. Use this when the chart has no
  revenue or no expense account — the usual cause is onboarding from a balance
  sheet (a Schlussbilanz contains no P&L account by definition), and it is the
  supported way to get the base chart's P&L onto an existing company. **A company
  with no industry, or one that resolves to the base chart, is accepted** on this
  scope, and only on this scope. Every absent P&L row is seeded, both sides —
  this is an explicit, accountant-invoked call, unlike the onboarding create's
  completion, which seeds only the side the chart is actually missing.

Control accounts (AR/AP/bank/suspense/VAT/opening balance) are never seeded by
either scope — their designation is owned by the control-marking service, and a
bare row seeded here would be an unmarked AR/AP/VAT account. **404** unknown fiscal
year; **409** closed year or empty (mid-onboarding) chart.

## Path parameters

- `company_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- ApplyIndustryTemplateRequest: ``POST /companies/{id}/ledger-accounts/apply-industry-template`` body (ZET-157). ``fiscal_year`` is deliberately required: the operation grows exactly one named year's chart, and an implicit "latest year" default would make the result depend on when the accountant clicks. ``scope`` (ZET-262) selects **what** is applied, and defaults to today's behaviour on purpose. This endpoint has no UI caller in either SPA, so 100% of its callers are API/MCP principals — the population that cannot be re-briefed by a copy change. Redefining the default would make the identical request that seeds 3 overlay rows today seed ~35 instead: - ``"overlay"`` (default) — the industry overlay's own accounts, and a company with no industry (or one that resolves to the base chart) is refused 422, so the "set your industry first" guidance survives; - ``"template"`` — the resolved template's **profit-and-loss** rows, base included, for a chart that cannot post to both sides. This is the explicit "I know it resolves to base, give me the chart" call, and the answer to ZET-262's "there is no supported way to obtain the base chart for an existing company". It is P&L-only for the same measured reason the onboarding completion is — see ``gl.chart_templates.template_pnl_completion``.
  - `fiscal_year` integer, required
  - `scope` 'overlay' | 'template'

## Response `200`

Successful Response

- ApplyIndustryTemplateResponse: What the industry-template application did (ZET-157). ``seeded`` — account codes created in the year's chart; ``existing`` — codes already present (left untouched, never renamed); ``ar_revenue_default_updated`` — the new AR revenue default, only when the company setting was actually changed (it is re-pointed only from unset/base- default values, never over an explicit choice). Which codes the three lists range over depends on ``ApplyIndustryTemplateRequest.scope``: the industry overlay's accounts (``"overlay"``, the default) or the resolved template's P&L rows (``"template"``).
  - `template_key` string, required
  - `label` string, required
  - `fiscal_year` integer, required
  - `seeded` string[], required
  - `existing` string[], required
  - `ar_revenue_default_updated` string, 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)
