метод REST
scope: crm
Устаревший
crm.vat.get
Получить ставку НДС по идентификатору
Устаревший метод.
Развитие метода остановлено. Используйте catalog.vat.get.
Описание
Метод crm.vat.get возвращает параметры ставки НДС по идентификатору.
Параметры
id
integer
обязательный
Идентификатор ставки НДС. Получить список ставок можно методом crm.vat.list
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":7}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.vat.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":7,"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.vat.get
try
{
const response = await $b24.callMethod(
'crm.vat.get',
{
id: 7
}
);
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.get',
[
'id' => 7,
]
);
$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 getting VAT information: ' . $e->getMessage();
}
BX24.callMethod(
"crm.vat.get",
{
id: 7
},
function(result) {
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'crm.vat.get',
[
'id' => 7
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "crm.vat.get", b24.Params{
"id": 7,
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("crm.vat.get: %w", err)
}
var item struct {
ID b24.ID `json:"ID"`
Active string `json:"ACTIVE"`
Name string `json:"NAME"`
Rate string `json:"RATE"`
CSort string `json:"C_SORT"`
}
if err := json.Unmarshal(res.Result, &item); err != nil {
return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println(item.ID, item.Active)
Ответ
HTTP-статус: 200
{
"result": {
"ID": "13",
"ACTIVE": "Y",
"NAME": "НДС 20%",
"RATE": "20.00",
"C_SORT": "100"
},
"time": {
"start": 1752043855.534128,
"finish": 1752043855.598301,
"duration": 0.06417298316955566,
"processing": 0.008214235305786133,
"date_start": "2025-07-09T09:50:55+03:00",
"date_finish": "2025-07-09T09:50:55+03:00",
"operating_reset_at": 1752044455,
"operating": 0
}
}
Возвращаемые данные
ID
integer
Идентификатор ставки НДС
ACTIVE
string
Активность ставки
C_SORT
integer
Сортировка
NAME
string
Название ставки
RATE
double
Значение ставки НДС, %
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 400
{
"error": "VAT rate not found.",
"error_description": "Ставка НДС не найдена."
}
| Код | Описание | Значение |
|---|---|---|
400 |
The Commercial Catalog module is not installed. |
Модуль catalog не установлен |
400 |
Access denied. |
Нет прав на выполнение операции |
400 |
VAT rate not found. |
Ставка НДС не найдена |

