Get a List of VAT Rates by Filter crm.vat.list

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: crm

Who can execute the method: any user

DEPRECATED

The development of this method has been halted. Please use catalog.vat.list.

The method crm.vat.list returns a list of VAT rates based on a filter. It is an implementation of the list method for VAT rates.

Method Parameters

Required parameters are marked with *

Name
type

Description

order
object

Object format:

{
            field_1: value_1,
            field_2: value_2,
            ...,
            field_n: value_n,
        }
        
  • field_n — the name of the field by which the VAT rates will be sorted
  • value_n — a string value that can be:
    • ASC — ascending order
    • DESC — descending order

The list of available fields for sorting can be obtained using the crm.vat.fields method

filter
object

Object format:

{
            field_1: value_1,
            field_2: value_2,
            ...,
            field_n: value_n,
        }
        
  • field_n — the name of the field by which the elements will be filtered
  • value_n — the filter value

The list of available fields for filtering can be obtained using the crm.vat.fields method

select
array

An array of fields to return. If not specified, all fields will be returned

Code Examples

How to Use Examples in Documentation

curl -X POST \
             -H "Content-Type: application/json" \
             -H "Accept: application/json" \
             -d '{"order":{"ID":"ASC"},"filter":{"ACTIVE":"Y"},"select":["ID","NAME","RATE"]}' \
             https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.vat.list
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"order":{"ID":"ASC"},"filter":{"ACTIVE":"Y"},"select":["ID","NAME","RATE"],"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/crm.vat.list
        
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory load.
        
        try {
          const response = await $b24.callListMethod(
            'crm.vat.list',
            {
              order: { ID: "ASC" },
              filter: { ACTIVE: "Y" },
              select: ["ID", "NAME", "RATE"]
            },
            (progress) => { console.log('Progress:', progress) }
          )
          const items = response.getData() || []
          for (const entity of items) { console.log('Entity:', entity) }
        } catch (error) {
          console.error('Request failed', error)
        }
        
        // fetchListMethod: Retrieves data in chunks using an iterator. Use for large volumes of data for efficient memory consumption.
        
        try {
          const generator = $b24.fetchListMethod('crm.vat.list', { order: { ID: "ASC" }, filter: { ACTIVE: "Y" }, select: ["ID", "NAME", "RATE"] }, 'ID')
          for await (const page of generator) {
            for (const entity of page) { console.log('Entity:', entity) }
          }
        } catch (error) {
          console.error('Request failed', error)
        }
        
        // callMethod: Manual control of pagination through the start parameter. Use for precise control over request batches. Less efficient for large data than fetchListMethod.
        
        try {
          const response = await $b24.callMethod('crm.vat.list', { order: { ID: "ASC" }, filter: { ACTIVE: "Y" }, select: ["ID", "NAME", "RATE"] }, 0)
          const result = response.getData().result || []
          for (const entity of result) { console.log('Entity:', entity) }
        } catch (error) {
          console.error('Request failed', error)
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'crm.vat.list',
                    [
                        'order'  => ['ID' => 'ASC'],
                        'filter' => ['ACTIVE' => 'Y'],
                        'select' => ['ID', 'NAME', 'RATE'],
                    ]
                );
        
            $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 fetching VAT list: ' . $e->getMessage();
        }
        
BX24.callMethod(
            "crm.vat.list",
            {
                order: { ID: "ASC" },
                filter: { ACTIVE: "Y" },
                select: ["ID", "NAME", "RATE"]
            },
            function(result) {
                if(result.error())
                    console.error(result.error());
                else
                    console.dir(result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'crm.vat.list',
            [
                'order' => [ 'ID' => 'ASC' ],
                'filter' => [ 'ACTIVE' => 'Y' ],
                'select' => [ 'ID', 'NAME', 'RATE' ]
            ]
        );
        
        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.list", b24.Params{
        	"order": b24.Params{
        		"ID": "ASC",
        	},
        	"filter": b24.Params{
        		"ACTIVE": "Y",
        	},
        	"select": []string{"ID", "NAME", "RATE"},
        }, b24.WithIdempotent())
        if err != nil {
        	return fmt.Errorf("crm.vat.list: %w", err)
        }
        
        var items []struct {
        	ID   b24.ID `json:"ID"`
        	Name string `json:"NAME"`
        }
        if err := json.Unmarshal(res.Result, &items); err != nil {
        	return fmt.Errorf("parse response: %w", err)
        }
        for _, it := range items {
        	fmt.Println(it.ID, it.Name)
        }
        
        // Total and Next are filled in by list methods; for a full
        // list traversal, use client.Core().Pages and Scan.
        if res.Total != nil {
        	fmt.Println("total:", *res.Total)
        }
        

Response Handling

HTTP Status: 200

{
            "result": [
                {
                    "ID": "1",
                    "NAME": "No VAT",
                    "RATE": null
                },
                {
                    "ID": "3",
                    "NAME": "VAT 20%",
                    "RATE": "20.00"
                },
                {
                    "ID": "7",
                    "NAME": "12",
                    "RATE": "12.00"
                }
            ],
            "total": 3,
            "time": {
                "start": 1752044697.589623,
                "finish": 1752044697.66439,
                "duration": 0.0747671127319336,
                "processing": 0.00588679313659668,
                "date_start": "2025-07-09T10:04:57+02:00",
                "date_finish": "2025-07-09T10:04:57+02:00",
                "operating_reset_at": 1752045297,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
object

The root element of the response. Contains an array of objects with information about VAT rate fields.

The structure of the fields may change due to the select parameter

total
integer

The total number of found items

time
time

Information about the execution time of the request

Error Handling

HTTP Status: 400

{
            "error": "Inadmissible fields for selection",
            "error_description": "Invalid fields were provided for selection."
        }
        

Name
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Code

Description

Value

400

The Commercial Catalog module is not installed.

The catalog module is not installed

400

Access denied.

No permission to perform the operation

400

"Inadmissible fields for selection.

Invalid fields were provided for selection

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
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

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

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

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 — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not 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

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

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 provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

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

Continue Learning