---
title: "Hydrate a business case from a template id for the authenticated company."
method: GET
path: "/core/v1/accounting/business-cases"
tags: ["Accounting"]
---

# Hydrate a business case from a template id for the authenticated company.

`GET /core/v1/accounting/business-cases`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/core/v1/accounting/business-cases`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

Loads the fully hydrated business-case aggregate the booking form needs: the template id, the company-VAT and fiscal-year context resolved from the optional date filters, the pre-translated display label, and the recursive snippet / field tree. When <code>dateForFilteringFiscalYear</code> is supplied it drives the fiscal-year resolution; otherwise <code>dateForFilteringCompanyVat</code> is used; otherwise the downstream service resolves the fiscal year that covers today. Tenant and company are derived from the bearer-token session — they are never accepted from the URL. The endpoint is a pure read — idempotent, no side effects. The caller must hold the <code>ACCOUNTING</code> permission on the company in scope.

## Query parameters

- `businessCaseTemplateId` integer, required
- `dateForFilteringCompanyVat` string, date
- `dateForFilteringFiscalYear` string, date

## Headers

- `Accept-Language` string

## Response `200`

Hydrated business-case aggregate for the requested template.

- PublicApiBusinessCase: Hydrated business-case aggregate: template, dates the company-VAT and fiscal year resolve to, and the snippet / field tree used by the booking form.
  - `businessCaseId` integer: Identifier of the business case instance when persisted; null on a freshly hydrated template.
  - `businessCaseTemplateId` integer: Identifier of the business-case template this aggregate was hydrated from.
  - `documentId` string: Identifier of the underlying document the business case is attached to; null when the booking is not yet linked to a document.
  - `display` string: Pre-translated display label of the business-case template for the request's Accept-Language.
  - `bookingNumbers` string: Comma-separated list of booking numbers already generated for this business case; empty on a fresh template.
  - `effectiveCompanyVatDate` string, date: Date used to resolve the company-VAT regime applicable to this business case (ISO yyyy-MM-dd).
  - `documentDate` string, date: Document date associated with the business case (ISO yyyy-MM-dd).
  - `effectiveFiscalYearDate` string, date: Date used to resolve the fiscal year applicable to this business case (ISO yyyy-MM-dd).
  - `fiscalYearHasCreatedAuto` boolean: True when the downstream service had to auto-create the fiscal year covering the resolved date.
  - `withOP` boolean: True when this business case is tracked as an open item (OP). May be null when not applicable.
  - `fields` object: Recursive snippet-and-field tree driving the booking form, keyed by snippet code. The shape of each entry follows the downstream BusinessCaseField model (see analysis report §8.2).
  - `entriesDefinition` object[]: Per-field entries definitions used by the booking form to resolve enum-like fields. Each entry mirrors the downstream FieldEntriesDefinition model (see analysis report §8.2).

## Other responses

- `400`: One of <code>dateForFilteringFiscalYear</code> / <code>dateForFilteringCompanyVat</code> is not a valid ISO date (<code>yyyy-MM-dd</code>), or the supplied <code>businessCaseTemplateId</code> is not valid for the company's legal form or VAT regime.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `401`: No Authorization header found or invalid token<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `403`: The current user is not allowed to access this company data<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `404`: No business-case template matches the supplied <code>businessCaseTemplateId</code> in the caller's company scope.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `429`: API rate limit exceeded<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `500`: Something went wrong on our side while processing the request. Please kindly contact our support.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

[API](https://skmtc.dev/klara/apis/klara-public-api.md) · [All operations](https://skmtc.dev/klara/apis/klara-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klara/apis/klara-public-api/revisions/490b1a879fc2?raw)
