> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# VAT codes

> How VAT codes work in Chift's Unified API and how to use them when booking invoices and journal entries.

### Definition

A **VAT code** (also called a tax code or tax rate) is the identifier for a specific tax configuration in an accounting system. It combines:

* A **tax rate** (e.g. 21%)
* A **tax type** (standard, reduced, exempt, reverse charge, etc.)
* The **associated ledger accounts** for input/output VAT postings

VAT codes are system-defined in the accounting software. You retrieve them with the API and reference them by ID when creating invoices or journal entries.

### Purpose

* Ensure the correct tax treatment is applied to each line.
* Let the accounting software — or Chift — generate the correct VAT ledger entries automatically.
* Provide consistent behavior across connectors even when underlying VAT mechanisms differ.

### Relationships

* Referenced on **invoice lines** via `tax_id`.
* Referenced on **journal entry lines** via `tax_info.tax_code`.
* Some VAT codes are flagged `withholding_tax: true` — these can only be used at invoice header level, not on lines (see [Spanish withholding taxes](/unified-apis/accounting/concepts/spanish-withholding-taxes)).
* Some VAT codes are flagged `reversed: true` — used for reverse-charge scenarios (see [Reversed VAT](/unified-apis/accounting/concepts/reversed-vat)).

### Endpoints

| Method | Endpoint                                                           | Description                     |
| ------ | ------------------------------------------------------------------ | ------------------------------- |
| GET    | [Get VAT Codes](/api-reference/endpoints/accounting/get-vat-codes) | List all VAT codes for a folder |

### Key fields

| Field             | Description                                                                   |
| ----------------- | ----------------------------------------------------------------------------- |
| `id`              | The identifier to pass as `tax_id` (invoices) or `tax_code` (journal entries) |
| `rate`            | The tax rate as a percentage (e.g. `21`)                                      |
| `name`            | Human-readable label                                                          |
| `reversed`        | `true` if this code triggers reverse-charge VAT posting                       |
| `withholding_tax` | `true` if this code is a withholding tax (Spain only)                         |
| `vat_account`     | Default input/output VAT ledger account                                       |

### See also

* [VAT on journal entry lines](/unified-apis/accounting/concepts/journal-entry/vat)
* [Reversed VAT](/unified-apis/accounting/concepts/reversed-vat)
* [Spanish withholding taxes](/unified-apis/accounting/concepts/spanish-withholding-taxes)
