Hydrate a business case from a template id, scoped to a single snippet.
Snippet-scoped variant of <code>GET /core/v1/accounting/business-cases</code>: hydrates only the template root plus the snippet identified by <code>snippet-id</code>, so the booking UI can stream the form one snippet at a time instead of loading the whole tree up-front. 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. When <code>group-insurance-by-insurer</code> is <code>true</code> (the default), social-insurance entries that share the same display + value pair are collapsed, keeping the entry with the smallest numeric id. 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.
Request
- Base URL: https://api.klara.ch
- URL: https://api.klara.ch/core/v1/accounting/business-cases/v2
- Auth: one of:
- API key in header X-API-KEY
- HTTP bearer
Query parameters
Numeric id of the business-case template to hydrate. Obtain it from <code>GET /core/v1/accounting/companies/current/business-case-templates</code>.
ISO date (<code>yyyy-MM-dd</code>) used to resolve the company-VAT regime applicable to the business case. Used as the fallback for <code>dateForFilteringFiscalYear</code> when that is omitted.
ISO date (<code>yyyy-MM-dd</code>) used to resolve the fiscal year that hydrates the business case. When omitted, falls back to <code>dateForFilteringCompanyVat</code>; when both are omitted the downstream service resolves the fiscal year that covers today.
When <code>true</code>, collapses social-insurance entries that share the same display + value pair, keeping the entry with the smallest numeric id. Defaults to <code>true</code>. Allowed values: <code>true</code>, <code>false</code>.
Numeric id of the snippet currently activated by the user; v2 hydrates only this snippet plus the template root. When omitted, only the template root is hydrated.
Currently ignored on the downstream side; reserved for a future optimisation that would load external entries only for the activated value (for example, payment dates of a single employee). Safe to omit.
Headers
IETF language tag used to translate the snippet labels and field captions. Examples: <code>de-CH</code>, <code>fr-CH</code>, <code>it-CH</code>, <code>en</code>.
Response
Hydrated business-case aggregate for the requested template and snippet.
Example response
{
"businessCaseTemplateId": 101,
"documentId": "null",
"display": "Bürobedarf",
"effectiveCompanyVatDate": "2024-06-15",
"documentDate": "2024-06-15",
"effectiveFiscalYearDate": "2024-06-15",
"fields": {
"PAYMENT": {
"snippetId": 42,
"nestedFields": {}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.