Get Deal by Id crm.deal.get
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
The development of this method has been halted. Please use crm.item.get.
The method crm.deal.get returns a deal by its identifier.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
id* |
The identifier of the deal. The identifier can be obtained using the methods crm.deal.list or crm.deal.add |
Related Methods and Topics
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ID":410}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.deal.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ID":410,"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.deal.get
try
{
const response = await $b24.callMethod(
'crm.deal.get',
{
id: 410,
}
);
const result = response.getData().result;
result.error()
? console.error(result.error())
: console.info(result)
;
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'crm.deal.get',
[
'id' => 410,
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
echo 'Error: ' . $result->error();
} else {
echo 'Deal data: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting deal: ' . $e->getMessage();
}
BX24.callMethod(
'crm.deal.get',
{
id: 410,
},
(result) => {
result.error()
? console.error(result.error())
: console.info(result.data())
;
},
);
require_once('crest.php');
$result = CRest::call(
'crm.deal.get',
[
'ID' => 410
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": {
"ID": "410",
"TITLE": "New Deal #1",
"TYPE_ID": "COMPLEX",
"STAGE_ID": "PREPARATION",
"PROBABILITY": "99",
"CURRENCY_ID": "EUR",
"OPPORTUNITY": "1000000.00",
"IS_MANUAL_OPPORTUNITY": "Y",
"TAX_VALUE": "0.00",
"LEAD_ID": null,
"COMPANY_ID": "9",
"CONTACT_ID": "84",
"QUOTE_ID": null,
"BEGINDATE": "2024-08-30T02:00:00+02:00",
"CLOSEDATE": "2024-09-09T02:00:00+02:00",
"ASSIGNED_BY_ID": "1",
"CREATED_BY_ID": "1",
"MODIFY_BY_ID": "1",
"DATE_CREATE": "2024-08-30T14:29:00+02:00",
"DATE_MODIFY": "2024-08-30T14:29:00+02:00",
"OPENED": "Y",
"CLOSED": "N",
"COMMENTS": "[B]Example comment[\/B]",
"ADDITIONAL_INFO": "Additional information",
"LOCATION_ID": null,
"CATEGORY_ID": "0",
"STAGE_SEMANTIC_ID": "P",
"IS_NEW": "N",
"IS_RECURRING": "N",
"IS_RETURN_CUSTOMER": "N",
"IS_REPEATED_APPROACH": "N",
"SOURCE_ID": "CALLBACK",
"SOURCE_DESCRIPTION": "Additional source information",
"ORIGINATOR_ID": null,
"ORIGIN_ID": null,
"MOVED_BY_ID": "1",
"MOVED_TIME": "2024-08-30T14:29:00+02:00",
"LAST_ACTIVITY_TIME": "2024-08-30T14:29:00+02:00",
"UTM_SOURCE": "google",
"UTM_MEDIUM": "CPC",
"UTM_CAMPAIGN": null,
"UTM_CONTENT": null,
"UTM_TERM": null,
"PARENT_ID_1220": "22",
"LAST_ACTIVITY_BY": "1",
"UF_CRM_1721244482250": "Hello world!"
},
"time": {
"start": 1725020945.541275,
"finish": 1725020946.179076,
"duration": 0.637800931930542,
"processing": 0.21427488327026367,
"date_start": "2024-08-30T14:29:05+02:00",
"date_finish": "2024-08-30T14:29:06+02:00",
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
The root element of the response. Contains information about the deal fields. The structure is described below |
|
time |
Information about the request execution time |
Deal Type
|
Name |
Description |
|
ID |
The identifier of the deal |
|
TITLE |
Title |
|
TYPE_ID |
String identifier of the deal type. To learn more about the obtained deal type, you can use the method crm.status.list by passing the filter:
|
|
CATEGORY_ID |
Sales Funnel. To learn more about this funnel, you can use the method crm.category.get by passing |
|
STAGE_ID |
String identifier of the deal stage. To learn more about the obtained stage, you can use the method crm.status.list by passing the filter:
where:
|
|
STAGE_SEMANTIC_ID |
Stage group. Possible values:
|
|
IS_NEW |
Indicates whether the deal is new. Possible values:
|
|
IS_RECURRING |
Indicates whether the deal is recurring. Possible values:
|
|
IS_RETURN_CUSTOMER |
Indicates whether the deal is a repeat. Possible values:
|
|
IS_REPEATED_APPROACH |
Indicates whether the approach is repeated. Possible values:
|
|
PROBABILITY |
Probability, % |
|
CURRENCY_ID |
Currency |
|
OPPORTUNITY |
Amount |
|
IS_MANUAL_OPPORTUNITY |
Indicates whether manual mode for calculating the amount is enabled. Possible values:
|
|
TAX_VALUE |
Tax rate |
|
COMPANY_ID |
Identifier of the company. To learn more about the company, you can use the method crm.item.get by passing |
|
CONTACT_ID |
Identifier of the contact. Deprecated. To get a list of all contacts associated with the deal, use the method crm.deal.contact.items.get or the universal method crm.item.get |
|
QUOTE_ID |
Identifier of the estimate based on which the deal was created. To learn more about the estimate, you can use the method crm.item.get by passing |
|
BEGINDATE |
Start date |
|
CLOSEDATE |
Close date |
|
OPENED |
Indicates whether the deal is available to everyone. Possible values:
|
|
CLOSED |
Indicates whether the deal is closed. Possible values:
|
|
COMMENTS |
Comment |
|
ASSIGNED_BY_ID |
Responsible person |
|
CREATED_BY_ID |
Created by |
|
MODIFY_BY_ID |
Modified by |
|
MOVED_BY_ID |
Identifier of the user who last changed the stage |
|
DATE_CREATE |
Creation date |
|
DATE_MODIFY |
Modification date |
|
MOVED_TIME |
Date of the last stage change |
|
SOURCE_ID |
Source. To learn more about the obtained source, you can use the method crm.status.list by passing the filter:
|
|
SOURCE_DESCRIPTION |
Additional information about the source |
|
LEAD_ID |
Identifier of the lead based on which the deal was created. To learn more about the lead, you can use the method crm.item.get by passing |
|
ADDITIONAL_INFO |
Additional information |
|
LOCATION_ID |
Location. System field |
|
ORIGINATOR_ID |
External source |
|
ORIGIN_ID |
Identifier of the item in the external source |
|
UTM_SOURCE |
Advertising system |
|
UTM_MEDIUM |
Traffic type |
|
UTM_CAMPAIGN |
Advertising campaign designation |
|
UTM_CONTENT |
Campaign content |
|
UTM_TERM |
Campaign search term |
|
LAST_ACTIVITY_TIME |
Date of the last activity in the timeline |
|
LAST_ACTIVITY_BY |
Author of the last activity in the timeline |
|
UF_CRM_... |
Custom fields. For example, Depending on the portal settings, deals may have a set of custom fields of defined types. Read more in the section about custom fields |
|
PARENT_ID_... |
Relationship fields. If there are smart processes associated with deals on the portal, there is a field for each such smart process that stores the relationship between this smart process and the deal. The field itself stores the identifier of the item of that smart process. For example, the field |
Error Handling
HTTP Status: 400
{
"error": "",
"error_description": "Parameter 'fields' 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 |
|
|
|
The user does not have permission to "read" this deal |
|
|
|
No deal exists with the 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 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 a List of Deals crm.deal.list
- Delete Deal crm.deal.delete
- Get Fields of the Deal crm.deal.fields