---
title: "Suggest ready-to-use VAT case / rate / account bundles for a booking line."
method: GET
path: "/core/latest/accounting/vat-suggestions"
tags: ["Accounting"]
deprecated: true
---

# Suggest ready-to-use VAT case / rate / account bundles for a booking line.

`GET /core/latest/accounting/vat-suggestions`

## Request

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

> **Deprecated.**

This operation remains available until <b>2027-08-14</b> and is removed after that date. Use <code>GET /core/v1/accounting/vat-suggestions</code> instead.<br/><br/>Turns a plain-language context — a purchase vs a sale — into ranked, copy-paste-ready VAT bundles. Each bundle carries the verbatim <code>vatCaseLink</code> and <code>vatRateLink</code> to drop into a booking line's <code>links</code>, plus a suggested <code>vatAccountCode</code>. Supply <code>amount</code> to also receive a net/VAT preview. The bundle marked <code>recommended</code> is the server's best guess.<br/><br/><strong>Rebuilding the Manual-booking VAT UI from this response (read this if you are generating a UI).</strong> This endpoint returns a <em>flat array</em>, but the Manual-booking screen renders it as <strong>three linked dropdowns plus two toggles and an auto-computed amount</strong>. Map each control as follows:<table border="1" cellpadding="4"><tr><th>GUI control</th><th>Driven by</th><th>How to build it</th></tr><tr><td><strong>VAT</strong> on/off toggle</td><td>client-side state (not in this response)</td><td>OFF → the line has no VAT: don't call this endpoint, add no VAT links/fields. ON → call this endpoint and show the dropdowns below.</td></tr><tr><td><strong>VAT case</strong> dropdown (e.g. "taxable supply")</td><td>distinct <code>vatCaseCode</code> (label it with <code>label</code>)</td><td>Group the array by <code>vatCaseCode</code>; one entry per distinct case.</td></tr><tr><td><strong>VAT rate</strong> dropdown (e.g. "8.1%")</td><td><code>vatRateDisplay</code></td><td>Cascades from the chosen case: the rows sharing the selected <code>vatCaseCode</code> are the rate options.</td></tr><tr><td><strong>VAT account</strong> dropdown (e.g. "1170 | Input tax VAT")</td><td><code>vatAccountCodes</code></td><td>List all <code>vatAccountCodes</code>; preselect <code>vatAccountCode</code>.</td></tr><tr><td><strong>including / excluding</strong> toggle</td><td>the <code>amountKind</code> query param</td><td><code>including</code> = <code>GROSS_INCLUSIVE</code>; <code>excluding</code> = <code>NET_EXCLUSIVE</code>. Flipping it means re-calling this endpoint to refresh the preview.</td></tr><tr><td>Debit / Credit amount preview</td><td><code>previewNet</code> / <code>previewVat</code></td><td>Null until you pass <code>amount</code>. Re-call with the new <code>amount</code>/<code>amountKind</code> to refresh.</td></tr></table><strong>End-to-end recipe (call → render → book):</strong><ol><li>User turns the VAT toggle ON. Call this endpoint with <code>direction</code> (PURCHASE/SALE), the line's <code>accountCode</code>, the user's <code>amount</code>, the <code>amountKind</code> from the including/excluding toggle, and the <code>date</code> you will book on.</li><li>Render the dropdowns per the table above; preselect the row where <code>recommended = true</code>.</li><li>When the user picks a row, send it to <code>POST /core/latest/bookings?autoCalculateVat=true</code>: on the VAT-bearing line set <code>links = "&lt;vatCaseLink&gt;,&lt;vatRateLink&gt;"</code> (both verbatim), <code>vatAccountCode = &lt;vatAccountCode&gt;</code>, your <code>amount</code>, and <code>isExcludeVatAmount</code> matching the <code>amountKind</code> you queried — then omit the VAT counterpart line; the server generates it (matching <code>previewNet</code>/<code>previewVat</code>). Pass the same <code>date</code> you will book on.<br/><br/><strong>Coverage:</strong> the response mirrors the booking GUI's two dropdowns. The VAT-case list is direction-agnostic (every configured case is offered regardless of <code>direction</code>), and the rate list includes every configured version of each rate code the case references — current <em>and</em> historical — so a line dated before a rate change still finds its rate.

## Query parameters

- `accountCode` integer, required
- `amount` number
- `amountKind` string
- `date` string
- `direction` 'PURCHASE' | 'SALE', required
- `vatCase` 'TAXABLE_SUPPLY' | 'SUPPLY_WITH_OPTION_ART_22' | 'TAX_EXEMPT_SUPPLY' | 'EXPORT' | 'SUPPLY_ABROAD' | 'EXCLUDED_SUPPLY' | 'DECREASE_IN_PROFITS' | 'INTERNAL_CONSUMPTION' | 'SUBVENTION' | 'CONTRIBUTIONS_DIVIDEND_DAMAGE_COMPENSION' | 'DOMESTIC_PURCHASE' | 'IMPORT_WITH_CUSTOMS' | 'IMPORT_WITH_REVERSE_CHARGE' | 'PURCHASE_ABROAD' | 'TRANSFER_SUPPLY' | 'MISCELLANEOUS' | 'DE_TAXATION' | 'MIXED_USE' | 'REDUCTION' | 'TAX_CREDIT_1050' | 'TAX_CREDIT_1055_1056'

## Headers

- `Accept-Language` string

## Response `200`

Ranked VAT suggestions.

- PublicApiVatSuggestion[]
  - `label` string: Human-meaningful label. Use it as the option text in the VAT-rate dropdown.
  - `recommended` boolean: True on the server's recommended default bundle — preselect this row in the dropdowns.
  - `reason` string: Why this bundle is suggested.
  - `vatCaseCode` string: VAT case code. Group rows by this value to build the VAT-case dropdown.
  - `vatCaseLink` string: Verbatim link to copy into a booking line's links (comma-joined with vatRateLink).
  - `vatRateDisplay` string: Display string of the VAT rate — the VAT-rate dropdown option within the selected VAT case.
  - `vatRateLink` string: Verbatim link to copy into a booking line's links (comma-joined with vatCaseLink).
  - `vatAccountCode` integer: Suggested VAT account for the generated VAT line — preselect this in the VAT-account dropdown; the first of vatAccountCodes (confirm against your chart of accounts).
  - `vatAccountCodes` integer[]: All VAT accounts the company's chart maps to this account + VAT case; the options for the GUI's VAT-account dropdown.
  - `previewNet` number: Net amount preview — the Debit/Credit preview shown in the GUI. Null until an amount is supplied; refreshes when amount/amountKind change.
  - `previewVat` number: VAT amount preview — the VAT portion shown in the GUI. Null until an amount is supplied; refreshes when amount/amountKind change.

## Other responses

- `400`: Data invalid<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.
- `410`: Gone. This operation is removed after 2027-08-14; every call after that date answers 410. Use <code>GET /core/v1/accounting/vat-suggestions</code> instead.<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)
