Create VAT Rate crm.vat.add
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
crmWho can execute the method: user with CRM administrator rights
DEPRECATED
Development of this method has been halted. Please use catalog.vat.add.
The method crm.vat.add creates a new VAT rate in the CRM.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
fields* |
Object format:
The list of available fields is described below |
Parameter fields
|
Name |
Description |
|
ACTIVE |
Activity of the rate:
Default — |
|
C_SORT |
Sorting. |
|
NAME* |
Name of the rate |
|
RATE* |
Value of the VAT rate, % |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"fields":{"ACTIVE":"Y","C_SORT":100,"NAME":"VAT 20%","RATE":20.0}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.vat.add
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"fields":{"ACTIVE":"Y","C_SORT":100,"NAME":"VAT 20%","RATE":20.0},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.vat.add
try
{
const response = await $b24.callMethod(
"crm.vat.add",
{
fields: {
ACTIVE: "Y",
C_SORT: 100,
NAME: "VAT 20%",
RATE: 20.0
}
}
);
const result = response.getData().result;
if(result.error())
console.error(result.error());
else
console.dir(result);
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'crm.vat.add',
[
'fields' => [
'ACTIVE' => 'Y',
'C_SORT' => 100,
'NAME' => 'VAT 20%',
'RATE' => 20.0
],
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
error_log($result->error());
} else {
echo 'Success: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error adding VAT: ' . $e->getMessage();
}
BX24.callMethod(
"crm.vat.add",
{
fields: {
ACTIVE: "Y",
C_SORT: 100,
NAME: "VAT 20%",
RATE: 20.0
}
},
function(result) {
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'crm.vat.add',
[
'fields' => [
'ACTIVE' => 'Y',
'C_SORT' => 100,
'NAME' => 'VAT 20%',
'RATE' => 20.0
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "crm.vat.add", b24.Params{
"fields": b24.Params{
"ACTIVE": "Y",
"C_SORT": 100,
"NAME": "VAT 20%",
"RATE": 20.0,
},
})
if err != nil {
return fmt.Errorf("crm.vat.add: %w", err)
}
var newID b24.ID
if err := json.Unmarshal(res.Result, &newID); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println("id:", newID)
Response Handling
HTTP Status: 200
{
"result": 13,
"time": {
"start": 1751982588.245153,
"finish": 1751982588.287266,
"duration": 0.04211306571960449,
"processing": 0.005285978317260742,
"date_start": "2025-07-08T16:49:48+02:00",
"date_finish": "2025-07-08T16:49:48+02:00",
"operating_reset_at": 1751983188,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Root element of the response, contains the identifier of the created VAT rate |
|
time |
Information about the execution time of the request |
Error Handling
HTTP Status: 400
{
"error": "Invalid parameters.",
"error_description": "Invalid parameters were provided."
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Code |
Description |
Value |
|
|
|
The catalog module is not installed |
|
|
|
Invalid parameters were provided |
|
|
|
No rights to perform the operation |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |