Get a List of Requisites by Filter crm.requisite.list
Scope:
crmWho can execute the method: any user
This method retrieves a list of requisites based on a filter.
Method Parameters
|
Name |
Description |
|
select |
An array containing the list of fields to be selected (see requisite fields). If not provided or an empty array is passed, all available requisite fields will be selected. |
|
filter |
An object for filtering the selected requisites in the format Possible values for An additional prefix can be specified for the key to clarify the filter behavior. Possible prefix values:
|
|
order |
An object for sorting the selected requisites in the format Possible values for Possible values for
|
|
start |
This parameter is used for pagination control. The page size of results is always static: 50 records. To select the second page of results, the value The formula for calculating the
|
Code Example
How to Use Examples in Documentation
-
Retrieving requisites by template ID
cURL (Webhook)cURL (OAuth)JSPHPcurl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"order":{"DATE_CREATE":"ASC"},"filter":{"PRESET_ID":"1"},"select":["ENTITY_TYPE_ID","ENTITY_ID","ID","NAME"]}' \ https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.requisite.listcurl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"order":{"DATE_CREATE":"ASC"},"filter":{"PRESET_ID":"1"},"select":["ENTITY_TYPE_ID","ENTITY_ID","ID","NAME"],"auth":"**put_access_token_here**"}' \ https://**put_your_bitrix24_address**/rest/crm.requisite.listBX24.callMethod( "crm.requisite.list", { order: { "DATE_CREATE": "ASC" }, filter: { "PRESET_ID": "1"}, select: [ "ENTITY_TYPE_ID", "ENTITY_ID", "ID", "NAME" ] }, function(result) { if(result.error()) console.error(result.error()); else { console.dir(result.data()); if(result.more()) result.next(); } } );require_once('crest.php'); $result = CRest::call( 'crm.requisite.list', [ 'order' => ["DATE_CREATE" => "ASC"], 'filter' => ["PRESET_ID" => "1"], 'select' => ["ENTITY_TYPE_ID", "ENTITY_ID", "ID", "NAME"] ] ); echo '<PRE>'; print_r($result); echo '</PRE>'; -
Retrieving the value of a custom field in requisites
cURL (Webhook)cURL (OAuth)JSPHPcurl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"order":{},"filter":{"ID":"51"},"select":["UF_CRM_1707997209"]}' \ https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.requisite.listcurl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"order":{},"filter":{"ID":"51"},"select":["UF_CRM_1707997209"],"auth":"**put_access_token_here**"}' \ https://**put_your_bitrix24_address**/rest/crm.requisite.listBX24.callMethod( "crm.requisite.list", { order: {}, filter: { "ID": "51"}, // Requisite ID select: [ "UF_CRM_1707997209"] // Custom field ID }, function(result) { if(result.error()) console.error(result.error()); else { console.dir(result.data()); if(result.more()) result.next(); } } );require_once('crest.php'); $result = CRest::call( 'crm.requisite.list', [ 'order' => [], 'filter' => ['ID' => '51'], 'select' => ['UF_CRM_1707997209'] ] ); echo '<PRE>'; print_r($result); echo '</PRE>';
Successful Response
HTTP status: 200
-
Response from example 1:
{ "result": [ { "ENTITY_TYPE_ID": "4", "ENTITY_ID": "3027", "ID": "40", "NAME": "Organization" }, { "ENTITY_TYPE_ID": "4", "ENTITY_ID": "3028", "ID": "41", "NAME": "Head Office Requisites" }, { "ENTITY_TYPE_ID": "4", "ENTITY_ID": "3028", "ID": "42", "NAME": "Branch in Chernyakhovsk" } ], "total": 3, "time": { "start": 1717150154.197056, "finish": 1717150154.505106, "duration": 0.30804991722106934, "processing": 0.030454158782958984, "date_start": "2024-05-31T12:09:14+02:00", "date_finish": "2024-05-31T12:09:14+02:00", "operating": 0 } } -
Response from example 2:
{ "result": [ { "UF_CRM_1707997209": "45" } ], "total": 1, "time": { "start": 1717151052.551011, "finish": 1717151052.94743, "duration": 0.39641880989074707, "processing": 0.028468847274780273, "date_start": "2024-05-31T12:24:12+02:00", "date_finish": "2024-05-31T12:24:12+02:00", "operating": 0 } }
Returned Data
|
Name |
Description |
|
result |
An array of objects containing information from the selected requisites. Each element contains the selected requisite fields |
|
total |
The total number of records found |
|
time |
Information about the execution time of the request |
Error Response
HTTP status: 400
{
"error": 0,
"error_description": "Access denied."
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Errors
|
Code |
Error Text |
Description |
|
|
Access denied. |
Insufficient access permissions to retrieve the list of requisites. |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- About Universal Requisites
- Add Requisite crm.requisite.add
- Update Requisite crm.requisite.update
- Get Requisite by ID crm.requisite.get
- Delete Requisite and Related Objects crm.requisite.delete
- Get CRM Requisite Fields