Get a List of Deals crm.deal.list
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
crmWho can execute the method: any user with "read" access permission for deals
DEPRECATED
Development of this method has been halted. Please use crm.item.list.
The method crm.deal.list returns a list of deals based on a filter. It is an implementation of the list method for deals.
Method Parameters
|
Name |
Description |
|
select |
A list of fields that should be populated for deals in the selection. The following masks can be used in the selection:
You can find the list of available fields for selection using the method crm.deal.fields. By default, all fields are taken — |
|
filter |
Object format:
where:
You can add a prefix to the keys
The LIKE filter does not work with fields of type You can find the list of available fields for filtering using the method crm.deal.fields. The filter does not support the field |
|
order |
Object format:
where:
You can find the list of available fields for sorting using the method crm.deal.fields |
|
start |
This parameter is used to manage pagination. The page size for results is always static — 50 records. To select the second page of results, pass the value The formula for calculating the
|
Also, see the description of list methods.
Related methods and topics
Code Examples
How to Use Examples in Documentation
Get a list of deals where:
- the funnel ID is
1 - the deal type is
COMPLEX - the title ends with
a - the stage is
C1:NEW - the amount is greater than 10000 but less than or equal to 20000
- manual mode for amount calculation is enabled
- the responsible person is either the user with
id = 1or the user withid = 6 - the deal was created at least 6 months ago
Set the following sort order for this selection: title and amount in ascending order.
For clarity, select only the necessary fields:
- Identifier
ID - Title
TITLE - Deal type
TYPE_ID - Funnel ID
CATEGORY_ID - Stage
STAGE_ID - Amount
OPPORTUNITY - Is manual mode enabled
IS_MANUAL_OPPORTUNITY - Responsible
ASSIGNED_BY_ID - Creation date
DATE_CREATE
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"SELECT":["ID","TITLE","TYPE_ID","CATEGORY_ID","STAGE_ID","OPPORTUNITY","IS_MANUAL_OPPORTUNITY","ASSIGNED_BY_ID","DATE_CREATE"],"FILTER":{"=%TITLE":"%a","CATEGORY_ID":1,"TYPE_ID":"COMPLEX","STAGE_ID":"C1:NEW",">OPPORTUNITY":10000,"<=OPPORTUNITY":20000,"IS_MANUAL_OPPORTUNITY":"Y","@ASSIGNED_BY_ID":[1,6],">DATE_CREATE":"'"$(date --date='-6 months' +%Y-%m-%d)"'"},"ORDER":{"TITLE":"ASC","OPPORTUNITY":"ASC"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.deal.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"SELECT":["ID","TITLE","TYPE_ID","CATEGORY_ID","STAGE_ID","OPPORTUNITY","IS_MANUAL_OPPORTUNITY","ASSIGNED_BY_ID","DATE_CREATE"],"FILTER":{"=%TITLE":"%a","CATEGORY_ID":1,"TYPE_ID":"COMPLEX","STAGE_ID":"C1:NEW",">OPPORTUNITY":10000,"<=OPPORTUNITY":20000,"IS_MANUAL_OPPORTUNITY":"Y","@ASSIGNED_BY_ID":[1,6],">DATE_CREATE":"'"$(date --date='-6 months' +%Y-%m-%d)"'"},"ORDER":{"TITLE":"ASC","OPPORTUNITY":"ASC"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.deal.list
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory load.
const now = new Date();
const sixMonthAgo = new Date();
sixMonthAgo.setMonth(now.getMonth() - 6);
try {
const response = await $b24.callListMethod(
'crm.deal.list',
{
select: [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
filter: {
'=%TITLE': '%a',
CATEGORY_ID: 1,
TYPE_ID: 'COMPLEX',
STAGE_ID: 'C1:NEW',
'>OPPORTUNITY': 10000,
'<=OPPORTUNITY': 20000,
IS_MANUAL_OPPORTUNITY: 'Y',
'@ASSIGNED_BY_ID': [1, 6],
'>DATE_CREATE': sixMonthAgo,
},
order: {
TITLE: 'ASC',
OPPORTUNITY: 'ASC',
},
},
(result) => {
result.error()
? console.error(result.error())
: console.info(result.data())
;
},
);
} catch (error) {
console.error('Request failed', error);
}
// fetchListMethod: Retrieves data in parts using an iterator. Use for large volumes of data for efficient memory consumption.
const now = new Date();
const sixMonthAgo = new Date();
sixMonthAgo.setMonth(now.getMonth() - 6);
try {
const generator = $b24.fetchListMethod('crm.deal.list', {
select: [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
filter: {
'=%TITLE': '%a',
CATEGORY_ID: 1,
TYPE_ID: 'COMPLEX',
STAGE_ID: 'C1:NEW',
'>OPPORTUNITY': 10000,
'<=OPPORTUNITY': 20000,
IS_MANUAL_OPPORTUNITY: 'Y',
'@ASSIGNED_BY_ID': [1, 6],
'>DATE_CREATE': sixMonthAgo,
},
order: {
TITLE: 'ASC',
OPPORTUNITY: 'ASC',
},
}, '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.
const now = new Date();
const sixMonthAgo = new Date();
sixMonthAgo.setMonth(now.getMonth() - 6);
try {
const response = await $b24.callMethod('crm.deal.list', {
select: [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
filter: {
'=%TITLE': '%a',
CATEGORY_ID: 1,
TYPE_ID: 'COMPLEX',
STAGE_ID: 'C1:NEW',
'>OPPORTUNITY': 10000,
'<=OPPORTUNITY': 20000,
IS_MANUAL_OPPORTUNITY: 'Y',
'@ASSIGNED_BY_ID': [1, 6],
'>DATE_CREATE': sixMonthAgo,
},
order: {
TITLE: 'ASC',
OPPORTUNITY: 'ASC',
},
}, 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.deal.list',
[
'select' => [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
'filter' => [
'=%TITLE' => '%a',
'CATEGORY_ID' => 1,
'TYPE_ID' => 'COMPLEX',
'STAGE_ID' => 'C1:NEW',
'>OPPORTUNITY' => 10000,
'<=OPPORTUNITY' => 20000,
'IS_MANUAL_OPPORTUNITY' => 'Y',
'@ASSIGNED_BY_ID' => [1, 6],
'>DATE_CREATE' => $sixMonthAgo,
],
'order' => [
'TITLE' => 'ASC',
'OPPORTUNITY' => 'ASC',
],
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
echo 'Error: ' . $result->error();
} else {
echo 'Data: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error fetching deal list: ' . $e->getMessage();
}
const now = new Date();
const sixMonthAgo = new Date();
sixMonthAgo.setMonth(now.getMonth() - 6);
BX24.callMethod(
'crm.deal.list',
{
select: [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
filter: {
'=%TITLE': '%a',
CATEGORY_ID: 1,
TYPE_ID: 'COMPLEX',
STAGE_ID: 'C1:NEW',
'>OPPORTUNITY': 10000,
'<=OPPORTUNITY': 20000,
IS_MANUAL_OPPORTUNITY: 'Y',
'@ASSIGNED_BY_ID': [1, 6],
'>DATE_CREATE': sixMonthAgo,
},
order: {
TITLE: 'ASC',
OPPORTUNITY: 'ASC',
},
},
(result) => {
result.error()
? console.error(result.error())
: console.info(result.data())
;
},
);
require_once('crest.php');
$sixMonthAgo = (new DateTime())->modify('-6 months')->format('Y-m-d');
$result = CRest::call(
'crm.deal.list',
[
'SELECT' => [
'ID',
'TITLE',
'TYPE_ID',
'CATEGORY_ID',
'STAGE_ID',
'OPPORTUNITY',
'IS_MANUAL_OPPORTUNITY',
'ASSIGNED_BY_ID',
'DATE_CREATE',
],
'FILTER' => [
'=%TITLE' => '%a',
'CATEGORY_ID' => 1,
'TYPE_ID' => 'COMPLEX',
'STAGE_ID' => 'C1:NEW',
'>OPPORTUNITY' => 10000,
'<=OPPORTUNITY' => 20000,
'IS_MANUAL_OPPORTUNITY' => 'Y',
'@ASSIGNED_BY_ID' => [1, 6],
'>DATE_CREATE' => $sixMonthAgo,
],
'ORDER' => [
'TITLE' => 'ASC',
'OPPORTUNITY' => 'ASC',
],
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": [
{
"ID": "37",
"TITLE": "[A] Deal",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "19999.99",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "1",
"DATE_CREATE": "2024-09-02T18:37:18+02:00"
},
{
"ID": "38",
"TITLE": "[A] Deal",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "20000.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "6",
"DATE_CREATE": "2024-09-02T18:37:38+02:00"
},
{
"ID": "39",
"TITLE": "[B] Sale",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "12500.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "1",
"DATE_CREATE": "2024-04-09T23:11:01+02:00"
},
{
"ID": "40",
"TITLE": "[B] Deal",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "13500.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "6",
"DATE_CREATE": "2024-08-08T19:00:14+02:00"
},
{
"ID": "41",
"TITLE": "[V] Deal",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "11500.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "6",
"DATE_CREATE": "2024-05-08T09:38:23+02:00"
},
{
"ID": "42",
"TITLE": "[S] Deal",
"TYPE_ID": "COMPLEX",
"CATEGORY_ID": "1",
"STAGE_ID": "C1:NEW",
"OPPORTUNITY": "18500.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"ASSIGNED_BY_ID": "6",
"DATE_CREATE": "2024-07-02T15:38:32+02:00"
}
],
"total": 6,
"time": {
"start": 1725292115.026221,
"finish": 1725292115.907058,
"duration": 0.8808369636535645,
"processing": 0.2484450340270996,
"date_start": "2024-09-02T17:48:35+02:00",
"date_finish": "2024-09-02T17:48:35+02:00",
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
The root element of the response. Contains an array of objects with information about the deal fields. Note that the structure of the fields may change due to the |
|
total |
The total number of found items |
|
next |
Contains the value to be passed in the next request in the The |
|
time |
Information about the execution time of the request |
Error Handling
HTTP Status: 400
{
"error": "",
"error_description": "Parameter 'filter' must be array."
}
|
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 |
|
|
|
The user does not have permission to "read" deals |
|
|
|
A non-object was passed to the |
|
|
|
A non-object was passed to the |
|
|
|
An unknown error occurred |
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 permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary 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 portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site 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
- Create a New Deal crm.deal.add
- Update Deal crm.deal.update
- Get Deal by Id crm.deal.get
- Delete Deal crm.deal.delete
- Get Fields of the Deal crm.deal.fields
- Add a CRM Activity to a New Lead or Deal Depending on the CRM Mode