Update Deal Direction crm.dealcategory.update
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
DEPRECATED
The development of this method has been halted. Please use crm.category.update.
This method updates an existing deal direction.
Parameters
|
Name |
Description |
|
id |
Identifier of the direction |
|
fields |
Field values for updating the deal direction. To find out the required format for the fields, execute the method |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":"1","fields":{"SORT":"100"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.dealcategory.update
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":"1","fields":{"SORT":"100"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.dealcategory.update
try
{
const id = prompt("Enter ID");
const sort = prompt("Enter sort order");
const parsedSort = parseInt(sort);
if(isNaN(parsedSort) || parsedSort < 0)
{
parsedSort = 0;
}
const response = await $b24.callMethod(
"crm.dealcategory.update",
{
id: id,
fields: { "SORT": parsedSort }
}
);
const result = response.getData().result;
if(result.error())
{
console.error(result.error());
}
else
{
console.info(result);
}
}
catch(error)
{
console.error('Error:', error);
}
$id = (int)readline("Enter ID");
$sort = (int)readline("Enter sort order");
if (is_nan($sort) || $sort < 0) {
$sort = 0;
}
try {
$response = $b24Service
->core
->call(
'crm.dealcategory.update',
[
'id' => $id,
'fields' => ['SORT' => $sort],
]
);
$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 updating deal category: ' . $e->getMessage();
}
var id = prompt("Enter ID");
var sort = prompt("Enter sort order");
sort = parseInt(sort);
if(isNaN(sort) || sort < 0)
{
sort = 0;
}
BX24.callMethod(
"crm.dealcategory.update",
{
id: id,
fields: { "SORT": sort }
},
function(result)
{
if(result.error())
console.error(result.error());
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$id = 1; // Replace 1 with the actual ID
$sort = 100; // Replace 100 with the actual sort value
$result = CRest::call(
'crm.dealcategory.update',
[
'id' => $id,
'fields' => ['SORT' => $sort]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';