Get a List of Directory Items by Filter crm.status.list
Scope:
crmWho can execute the method: any user
The method crm.status.list returns a list of directory items based on the filter.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
order |
Object format:
The list of fields for sorting can be found using the method crm.status.fields |
|
filter |
Object format:
The list of fields for filtering can be found using the method crm.status.fields |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"order":{"SORT":"ASC"},"filter":{"ENTITY_ID":"DEAL_STAGE"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.status.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"order":{"SORT":"ASC"},"filter":{"ENTITY_ID":"DEAL_STAGE"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.status.list
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory usage.
try {
const response = await $b24.callListMethod(
'crm.status.list',
{
order: { SORT: "ASC" },
filter: { ENTITY_ID: "DEAL_STAGE" }
}
)
const items = response.getData() || []
for (const entity of items) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error)
}
// fetchListMethod: Retrieves data in parts using an iterator. Use it for large data volumes to optimize memory usage.
try {
const generator = $b24.fetchListMethod('crm.status.list', {
order: { SORT: "ASC" },
filter: { ENTITY_ID: "DEAL_STAGE" }
}, 'ID')
for await (const page of generator) {
for (const entity of page) { console.log('Entity:', entity) }
}
} catch (error) {
console.error('Request failed', error)
}
// callMethod: Manually controls pagination through the start parameter. Use it for precise control of request batches. For large datasets, it is less efficient than fetchListMethod.
try {
const response = await $b24.callMethod('crm.status.list', {
order: { SORT: "ASC" },
filter: { ENTITY_ID: "DEAL_STAGE" }
}, 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.status.list',
[
'order' => ['SORT' => 'ASC'],
'filter' => ['ENTITY_ID' => 'DEAL_STAGE'],
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
error_log($result->error());
echo 'Error: ' . $result->error();
} else {
echo 'Success: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error fetching status list: ' . $e->getMessage();
}
BX24.callMethod(
"crm.status.list",
{
order: { SORT: "ASC" },
filter: { ENTITY_ID: "DEAL_STAGE" }
},
function(result) {
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'crm.status.list',
[
'order' => [ 'SORT' => 'ASC' ],
'filter' => [ 'ENTITY_ID' => 'DEAL_STAGE' ]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": [
{
"ID": "101",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "NEW",
"NAME": "New",
"NAME_INIT": "New",
"SORT": "10",
"SYSTEM": "Y",
"CATEGORY_ID": null,
"COLOR": "#39A8EF",
"SEMANTICS": null,
"EXTRA": {
"SEMANTICS": "process",
"COLOR": "#39A8EF"
}
},
{
"ID": "103",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "PREPARATION",
"NAME": "Document Preparation",
"NAME_INIT": "",
"SORT": "20",
"SYSTEM": "N",
"CATEGORY_ID": null,
"COLOR": "#2FC6F6",
"SEMANTICS": null,
"EXTRA": {
"SEMANTICS": "process",
"COLOR": "#2FC6F6"
}
},
{
"ID": "105",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "PREPAYMENT_INVOICE",
"NAME": "Prepayment Invoice",
"NAME_INIT": "",
"SORT": "30",
"SYSTEM": "N",
"CATEGORY_ID": null,
"COLOR": "#55D0E0",
"SEMANTICS": null,
"EXTRA": {
"SEMANTICS": "process",
"COLOR": "#55D0E0"
}
},
{
"ID": "107",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "EXECUTING",
"NAME": "In Progress",
"NAME_INIT": "",
"SORT": "40",
"SYSTEM": "N",
"CATEGORY_ID": null,
"COLOR": "#47E4C2",
"SEMANTICS": null,
"EXTRA": {
"SEMANTICS": "process",
"COLOR": "#47E4C2"
}
},
{
"ID": "109",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "FINAL_INVOICE",
"NAME": "Final Invoice",
"NAME_INIT": "",
"SORT": "50",
"SYSTEM": "N",
"CATEGORY_ID": null,
"COLOR": "#FFA900",
"SEMANTICS": null,
"EXTRA": {
"SEMANTICS": "process",
"COLOR": "#FFA900"
}
},
{
"ID": "111",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "WON",
"NAME": "Deal Successful",
"NAME_INIT": "Deal Successful",
"SORT": "60",
"SYSTEM": "Y",
"CATEGORY_ID": null,
"COLOR": "#7BD500",
"SEMANTICS": "S",
"EXTRA": {
"SEMANTICS": "success",
"COLOR": "#7BD500"
}
},
{
"ID": "113",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "LOSE",
"NAME": "Deal Failed",
"NAME_INIT": "Deal Failed",
"SORT": "70",
"SYSTEM": "Y",
"CATEGORY_ID": null,
"COLOR": "#FF5752",
"SEMANTICS": "F",
"EXTRA": {
"SEMANTICS": "failure",
"COLOR": "#FF5752"
}
},
{
"ID": "115",
"ENTITY_ID": "DEAL_STAGE",
"STATUS_ID": "APOLOGY",
"NAME": "Reason for Failure Analysis",
"NAME_INIT": "",
"SORT": "80",
"SYSTEM": "N",
"CATEGORY_ID": null,
"COLOR": "#FF5752",
"SEMANTICS": "F",
"EXTRA": {
"SEMANTICS": "apology",
"COLOR": "#FF5752"
}
}
],
"total": 8,
"time": {
"start": 1752146147.312812,
"finish": 1752146147.354549,
"duration": 0.04173684120178223,
"processing": 0.00507807731628418,
"date_start": "2025-07-10T14:15:47+02:00",
"date_finish": "2025-07-10T14:15:47+02:00",
"operating_reset_at": 1752146747,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
An array of objects with information about directory items |
|
total |
The total number of found items |
|
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 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 Error Codes
|
Code |
Description |
Value |
|
|
|
No permission to perform the operation |
|
|
|
Invalid parameters were provided |
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
- Get Description of CRM Status Fields
- Get a directory item by ID crm.status.get
- Create CRM Status Element crm.status.add
- Update CRM Status Element `crm.status.update`
- Delete CRM Status Element `crm.status.delete`
- How to Filter Items by Stage Name
- How to Get a List of Stages with Semantics for CRM Objects
- How to Create a New Sales Funnel with Stages in a Smart Process