# Catalog VAT rates

Bitrix24 reference data for catalog products. Method family: `catalog.vat.*`. Scope: `catalog`.

## Operations

- [Create](./catalog-vat-rates/create.md): `POST /v1/catalog-vat-rates`
- [List](./catalog-vat-rates/list.md): `GET /v1/catalog-vat-rates`
- [Get](./catalog-vat-rates/get.md): `GET /v1/catalog-vat-rates/:id`
- [Update](./catalog-vat-rates/update.md): `PATCH /v1/catalog-vat-rates/:id`
- [Delete](./catalog-vat-rates/delete.md): `DELETE /v1/catalog-vat-rates/:id`
- [Search](./catalog-vat-rates/search.md): `POST /v1/catalog-vat-rates/search`
- [Fields](./catalog-vat-rates/fields.md): `GET /v1/catalog-vat-rates/fields`

## What to know

Creation requires `name` and `rate`. Batch updates require both fields in each item; single PATCH prefills omitted fields. `active` accepts only `Y` or `N`, and `sort` must be a positive integer; invalid values are refused before Bitrix24 can silently replace or ignore them.

On PATCH the wrapper reads the current `name` and `rate` and sends them with the changed fields because Bitrix24 requires both. If the record id does not exist, that read returns 404. An existing No VAT row may return `rate: null`, but creation with `rate: null` returns 400 before Bitrix24 is called; an update returned 422 `Required fields: rate` on the tested account. Bitrix24 sets `timestampX` and ignores submitted values, so it is read only.

Deleting a rate calls `CCatalogVat::Delete`, which deletes the rate record through `Vat::delete`. It does not reassign products’ `vatId`; a stored ID may then have no matching rate. Check affected products and tax calculations before deleting a rate. Delete only a rate that is not used by products.

Bitrix24 lists pages of 50 records; `limit > 50` enables V1 auto pagination. Batch writes cannot carry JSON `null` faithfully; use a single-record request when a nullable field must be changed.

Both `POST /v1/batch` and `POST /v1/catalog-vat-rates/batch` are available.
