Get Company Information crm.company.get
Scope:
crmWho can execute the method: user with "Read" access permission for companies
Method development has been halted
The method crm.company.get is still operational, but there is a more current equivalent crm.item.get.
The method crm.company.get returns a company by its identifier.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
id* |
Company identifier |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ID":12}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.company.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ID":12,"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.company.get
try
{
const id = prompt("Enter ID");
const response = await $b24.callMethod(
"crm.company.get",
{ id: id }
);
const result = response.getData().result;
console.dir(result);
}
catch(error)
{
console.error(error);
}
$id = readline("Enter ID: ");
try {
$response = $b24Service
->core
->call(
'crm.company.get',
[
'id' => $id,
]
);
$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 getting company: ' . $e->getMessage();
}
var id = prompt("Enter ID");
BX24.callMethod(
"crm.company.get",
{ id: id },
function(result)
{
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'crm.company.get',
[
'ID' => 12
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": {
"ID": "2909",
"COMPANY_TYPE": "CUSTOMER",
"TITLE": "GAZPROM",
"LOGO": null,
"LEAD_ID": null,
"HAS_PHONE": "N",
"HAS_EMAIL": "N",
"HAS_IMOL": "N",
"ASSIGNED_BY_ID": "139",
"CREATED_BY_ID": "835",
"MODIFY_BY_ID": "1",
"BANKING_DETAILS": "7736050003",
"INDUSTRY": "IT",
"REVENUE": "0",
"CURRENCY_ID": "EUR",
"EMPLOYEES": "EMPLOYEES_1",
"COMMENTS": "",
"DATE_CREATE": "2024-03-11T16:36:46+01:00",
"DATE_MODIFY": "2024-08-01T16:08:08+01:00",
"OPENED": "N",
"IS_MY_COMPANY": "N",
"ORIGINATOR_ID": null,
"ORIGIN_ID": null,
"ORIGIN_VERSION": null,
"ADDRESS": null,
"ADDRESS_2": null,
"ADDRESS_CITY": null,
"ADDRESS_POSTAL_CODE": null,
"ADDRESS_REGION": null,
"ADDRESS_PROVINCE": null,
"ADDRESS_COUNTRY": null,
"ADDRESS_COUNTRY_CODE": null,
"ADDRESS_LOC_ADDR_ID": null,
"ADDRESS_LEGAL": null,
"REG_ADDRESS": null,
"REG_ADDRESS_2": null,
"REG_ADDRESS_CITY": null,
"REG_ADDRESS_POSTAL_CODE": null,
"REG_ADDRESS_REGION": null,
"REG_ADDRESS_PROVINCE": null,
"REG_ADDRESS_COUNTRY": null,
"REG_ADDRESS_COUNTRY_CODE": null,
"REG_ADDRESS_LOC_ADDR_ID": null,
"UTM_SOURCE": null,
"UTM_MEDIUM": null,
"UTM_CAMPAIGN": null,
"UTM_CONTENT": null,
"UTM_TERM": null,
"PARENT_ID_156": null,
"LAST_ACTIVITY_BY": "835",
"LAST_ACTIVITY_TIME": "2024-03-11T16:36:46+01:00",
"LAST_COMMUNICATION_TIME": null,
"UF_CRM_1687188367": ""
},
"time": {
"start": 1769497419,
"finish": 1769497419.915092,
"duration": 0.9150919914245605,
"processing": 0,
"date_start": "2026-01-27T10:03:39+01:00",
"date_finish": "2026-01-27T10:03:39+01:00",
"operating_reset_at": 1769498019,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Root element of the response, returns company fields. Description of company fields can be obtained using the method crm.company.fields |
|
time |
Information about the request execution time |
Error Handling
HTTP Status: 400
{
"error": "",
"error_description": "Not found"
}
|
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 "Read" access permission for companies |
|
|
|
Company not found |
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
- Create a New Company crm.company.add
- Get a List of Companies by Filter crm.company.list
- Update Existing Company crm.company.update
- Delete Company crm.company.delete
- Get Company Field Descriptions crm.company.fields