[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcatalog-vat-rates\u002Fcreate":3,"docs-tabs-entities\u002Fcatalog-vat-rates\u002Fcreate":6},{"content":4,"lastmod":5},"## Create a VAT rate\n\n`POST \u002Fv1\u002Fcatalog-vat-rates`\n\nAdds a VAT rate to the product catalog's list of VAT rates. The request body is flat, without a `fields` wrapper.\n\n## Request body fields\n\n| Field | Type | Required | Description |\n|------|------|------|------|\n| `name` | string | yes | VAT rate name. |\n| `rate` | number | yes | VAT percentage. Fractional numbers and `0` are accepted. `null` is not accepted. |\n| `active` | string | no | Status: `Y` or `N`. Other values and `null` are rejected. |\n| `sort` | number | no | Sort order, an integer of at least `1`. `null` is not accepted. |\n\n`id` and `timestampX` are read-only. See [VAT rate fields](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Ffields) for the full list.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-vat-rates\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"name\": \"Docs VAT 2026-10-08\",\n  \"rate\": 7.5,\n  \"active\": \"N\",\n  \"sort\": 900\n}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-vat-rates\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"name\": \"Docs VAT 2026-10-08\",\n  \"rate\": 7.5,\n  \"active\": \"N\",\n  \"sort\": 900\n}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-vat-rates', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    \"name\": \"Docs VAT 2026-10-08\",\n    \"rate\": 7.5,\n    \"active\": \"N\",\n    \"sort\": 900\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('ID:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-vat-rates', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    \"name\": \"Docs VAT 2026-10-08\",\n    \"rate\": 7.5,\n    \"active\": \"N\",\n    \"sort\": 900\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('ID:', data.id)\n```\n\n## Response fields\n\nThe response has status `201` and contains the complete created record.\n\n| Field | Type | Description |\n|------|------|------|\n| `success` | boolean | Always `true` on success. |\n| `data` | object | VAT rate object. |\n| `data.id` | number | VAT rate identifier. List: [`GET \u002Fv1\u002Fcatalog-vat-rates`](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Flist). Pass it as the product's `vatId`. |\n| `data.name` | string | VAT rate name. |\n| `data.rate` | number \\| null | VAT percentage. For an existing \"No VAT\" rate, this field may be `null`. |\n| `data.active` | string | Rate status: `Y` — active, `N` — inactive. |\n| `data.sort` | number | Sort order. |\n| `data.timestampX` | string | Modification date and time in ISO 8601 format. Set by Bitrix24. |\n| `meta.warnings` | array | For an unknown field name, contains an `UNRECOGNIZED_WRITE_FIELD` warning with `code`, `field`, and `message` keys. On a route that wraps the field map itself, an object under `fields` is rejected with `400 NESTED_FIELDS_ENVELOPE` when the schema does not declare `fields`; pass fields flat at the JSON root. |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"active\": \"N\",\n    \"id\": 25,\n    \"name\": \"Docs VAT 2026-10-08\",\n    \"rate\": 7.5,\n    \"sort\": 900,\n    \"timestampX\": \"2026-10-08T18:49:59.000Z\"\n  }\n}\n```\n\n## Error response example\n\n400 — `rate` is missing. No record is created:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_REQUIRED_FIELDS\",\n    \"message\": \"Body field \\\"rate\\\" is required to create catalogVatRate.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|------|------|\n| 400 | `MISSING_REQUIRED_FIELDS` | `name` or `rate` is missing, `null`, or an empty string. The message names the first missing field. |\n| 400 | `INVALID_PARAMS` | An invalid field type, `active` outside `Y`\u002F`N`, or a fractional or non-positive `sort`. `active` and `sort` cannot be `null`. |\n| 400 | `READONLY_FIELD` | The body contains `id` or `timestampX`. Remove the field from the request. |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. See `error.message` for the reason and `error.b24Code` for the original code. |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | Writes are blocked: the key is read-only. |\n| 403 | `SCOPE_DENIED` | The key does not have the `catalog` scope. |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing. |\n| 401 | `TOKEN_MISSING` | The key has no configured Bitrix24 tokens. For an OAuth application key, check the user session. |\n\nFor all common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**An unknown scalar field may not be saved.** It does not bypass required-field validation. The response may contain `meta.warnings` with `UNRECOGNIZED_WRITE_FIELD`. Check names against [VAT rate fields](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Ffields) and verify the values in `data`.\n\n## See also\n\n- [List VAT rates](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Flist)\n- [Get a VAT rate](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Fget)\n- [Update a VAT rate](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Fupdate)\n- [Delete a VAT rate](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Fdelete)\n- [VAT rate fields](\u002Fdocs\u002Fentities\u002Fcatalog-vat-rates\u002Ffields)\n- [Catalog products](\u002Fdocs\u002Fentities\u002Fcatalog-products)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-15",{},1795415205345]