Get a List of Items crm.item.list
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
crmWho can execute the method: any user with "read" permission for the CRM object items
Retrieves a list of items of a specific CRM object type.
CRM object items will not be included in the final selection if the user does not have "read" permission for those items.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
entityTypeId* |
System or user type identifier whose items need to be retrieved. Numeric values for system types (Lead — 1, Deal — 2, Contact — 3, Company — 4, Account — 31, etc.) are provided in the CRM object type directory. The SPA identifier can be found using the crm.type.list method |
|
select |
List of fields that must be populated for the items in the selection. May contain only item field names or The list of all available fields for selection can be found using the The |
|
filter |
Format object:
where
The filter can have unlimited nesting and number of conditions. A prefix can be added to the
The list of all available fields for filtering can be found using the To filter by custom fields of type |
|
order |
Format object:
where
A list of all available fields for sorting can be obtained using the |
|
start |
This parameter is used to control pagination. The page size of results is always static — 50 records. To select the second page of results, pass the value The formula for calculating the
|
|
useOriginalUfNames |
Parameter to control the format of custom field names in the request and response.
Default is |
Code Examples
Retrieve a list of leads where:
- First name or last name is not empty.
- Status is "In Progress" or "Not Processed".
- Source is "Ads" or "Site".
- Assigned to managers with identifiers 1 or 6.
- Deal amount is between 5000 and 20000.
- Amount calculation mode is manual.
Set the following sorting order for this selection:
- First name and last name in ascending order.
For clarity, we will select only the necessary fields:
idIDtitleTitlenameFirst namelastNameLast namestageIdStage IDsourceIdSource IDassignedByIdResponsible IDopportunityAmountisManualOpportunityAmount calculation mode
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"entityTypeId":1,"select":["id","title","lastName","name","stageId","sourceId","assignedById","opportunity","isManualOpportunity"],"filter":{"0":{"logic":"OR","0":{"!=name":""},"1":{"!=lastName":""}},"@stageId":["NEW","IN_PROCESS"],"@sourceId":["WEB","ADVERTISING"],"@assignedById":[1,6],">=opportunity":5000,"<=opportunity":20000,"isManualOpportunity":"Y"},"order":{"lastName":"ASC","name":"ASC"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.item.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"entityTypeId":1,"select":["id","title","lastName","name","stageId","sourceId","assignedById","opportunity","isManualOpportunity"],"filter":{"0":{"logic":"OR","0":{"!=name":""},"1":{"!=lastName":""}},"@stageId":["NEW","IN_PROCESS"],"@sourceId":["WEB","ADVERTISING"],"@assignedById":[1,6],">=opportunity":5000,"<=opportunity":20000,"isManualOpportunity":"Y"},"order":{"lastName":"ASC","name":"ASC"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.item.list
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
type CrmItem = {
id: number
assignedById: number
stageId: string
opportunity: number
sourceId: string
title: string
name: string
lastName: string | null
isManualOpportunity: string
}
// Shape of the payload returned in result (match the "response handling" section of the page)
type CrmItemListResult = {
items: CrmItem[]
}
try {
// crm.item.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make<CrmItemListResult>({
method: 'crm.item.list',
params: {
entityTypeId: 1,
select: [
'id',
'title',
'lastName',
'name',
'stageId',
'sourceId',
'assignedById',
'opportunity',
'isManualOpportunity',
],
filter: {
'0': {
logic: 'OR',
'0': {
'!=name': '',
},
'1': {
'!=lastName': '',
},
},
'@stageId': ['NEW', 'IN_PROCESS'],
'@sourceId': ['WEB', 'ADVERTISING'],
'@assignedById': [1, 6],
'>=opportunity': 5000,
'<=opportunity': 20000,
isManualOpportunity: 'Y',
},
order: {
lastName: 'ASC',
name: 'ASC',
},
start: 0,
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info('Fetched items:', result.items.length, result.items)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getCrmItemList() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// crm.item.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make({
method: 'crm.item.list',
params: {
entityTypeId: 1,
select: [
'id',
'title',
'lastName',
'name',
'stageId',
'sourceId',
'assignedById',
'opportunity',
'isManualOpportunity',
],
filter: {
'0': {
logic: 'OR',
'0': {
'!=name': '',
},
'1': {
'!=lastName': '',
},
},
'@stageId': ['NEW', 'IN_PROCESS'],
'@sourceId': ['WEB', 'ADVERTISING'],
'@assignedById': [1, 6],
'>=opportunity': 5000,
'<=opportunity': 20000,
isManualOpportunity: 'Y',
},
order: {
lastName: 'ASC',
name: 'ASC',
},
start: 0,
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info('Fetched items:', result.items.length, result.items)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getCrmItemList)
</script>
Example
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.crm.item.list(
entity_type_id=1,
select=[
"id",
"title",
"lastName",
"name",
"stageId",
"sourceId",
"assignedById",
"opportunity",
"isManualOpportunity",
],
filter={
"0": {
"logic": "OR",
"0": {
"!=name": "",
},
"1": {
"!=lastName": "",
},
},
"@stageId": ["NEW", "IN_PROCESS"],
"@sourceId": ["WEB", "ADVERTISING"],
"@assignedById": [1, 6],
">=opportunity": 5000,
"<=opportunity": 20000,
"isManualOpportunity": "Y",
},
order={
"lastName": "ASC",
"name": "ASC",
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
Example as_list
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.crm.item.list(
entity_type_id=1,
select=[
"id",
"title",
"lastName",
"name",
"stageId",
"sourceId",
"assignedById",
"opportunity",
"isManualOpportunity",
],
filter={
"0": {
"logic": "OR",
"0": {
"!=name": "",
},
"1": {
"!=lastName": "",
},
},
"@stageId": ["NEW", "IN_PROCESS"],
"@sourceId": ["WEB", "ADVERTISING"],
"@assignedById": [1, 6],
">=opportunity": 5000,
"<=opportunity": 20000,
"isManualOpportunity": "Y",
},
order={
"lastName": "ASC",
"name": "ASC",
},
).as_list().response
result = bitrix_response.result
for item in result:
print(item)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
Example as_list_fast
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.crm.item.list(
entity_type_id=1,
select=[
"id",
"title",
"lastName",
"name",
"stageId",
"sourceId",
"assignedById",
"opportunity",
"isManualOpportunity",
],
filter={
"0": {
"logic": "OR",
"0": {
"!=name": "",
},
"1": {
"!=lastName": "",
},
},
"@stageId": ["NEW", "IN_PROCESS"],
"@sourceId": ["WEB", "ADVERTISING"],
"@assignedById": [1, 6],
">=opportunity": 5000,
"<=opportunity": 20000,
"isManualOpportunity": "Y",
},
order={
"lastName": "ASC",
"name": "ASC",
},
).as_list_fast(descending=True).response
result = bitrix_response.result
for item in result:
print(item)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$entityTypeId = 1; // Replace with actual entity type ID
$order = []; // Replace with actual order array
$filter = []; // Replace with actual filter array
$select = []; // Replace with actual select array
$startItem = 0; // Optional, can be adjusted as needed
$itemsResult = $serviceBuilder
->getCRMScope()
->item()
->list($entityTypeId, $order, $filter, $select, $startItem);
foreach ($itemsResult->getItems() as $item) {
print("ID: " . $item->id . PHP_EOL);
print("XML ID: " . $item->xmlId . PHP_EOL);
print("Title: " . $item->title . PHP_EOL);
print("Created By: " . $item->createdBy . PHP_EOL);
print("Updated By: " . $item->updatedBy . PHP_EOL);
print("Created Time: " . $item->createdTime->format(DATE_ATOM) . PHP_EOL);
print("Updated Time: " . $item->updatedTime->format(DATE_ATOM) . PHP_EOL);
// Add more fields as necessary
}
} catch (Throwable $e) {
print("Error: " . $e->getMessage() . PHP_EOL);
}
BX24.callMethod(
'crm.item.list',
{
entityTypeId: 1,
select: [
"id",
"title",
"lastName",
"name",
"stageId",
"sourceId",
"assignedById",
"opportunity",
"isManualOpportunity",
],
filter: {
"0": {
logic: "OR",
"0": {
"!=name": "",
},
"1": {
"!=lastName": "",
},
},
"@stageId": ["NEW", "IN_PROCESS"],
"@sourceId": ['WEB', "ADVERTISING"],
"@assignedById": [1, 6],
">=opportunity": 5000,
"<=opportunity": 20000,
"isManualOpportunity": "Y",
},
order: {
lastName: 'ASC',
name: 'ASC',
},
},
(result) => {
if (result.error())
{
console.error(result.error());
return;
}
console.info(result.data());
},
);
require_once('crest.php');
$result = CRest::call(
'crm.item.list',
[
'entityTypeId' => 1,
'select' => [
"id",
"title",
"lastName",
"name",
"stageId",
"sourceId",
"assignedById",
"opportunity",
"isManualOpportunity",
],
'filter' => [
"0" => [
"logic" => "OR",
"0" => [
"!=name" => "",
],
"1" => [
"!=lastName" => "",
],
],
"@stageId" => ["NEW", "IN_PROCESS"],
"@sourceId" => ['WEB', "ADVERTISING"],
"@assignedById" => [1, 6],
">=opportunity" => 5000,
"<=opportunity" => 20000,
"isManualOpportunity" => "Y",
],
'order' => [
'lastName' => 'ASC',
'name' => 'ASC',
],
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "crm.item.list", b24.Params{
"entityTypeId": 1,
"select": []string{"id", "title", "lastName", "name", "stageId", "sourceId", "assignedById", "opportunity", "isManualOpportunity"},
"filter": b24.Params{
"0": b24.Params{
"logic": "OR",
"0": b24.Params{
"!=name": "",
},
"1": b24.Params{
"!=lastName": "",
},
},
"@stageId": []string{"NEW", "IN_PROCESS"},
"@sourceId": []string{"WEB", "ADVERTISING"},
"@assignedById": []int{1, 6},
">=opportunity": 5000,
"<=opportunity": 20000,
"isManualOpportunity": "Y",
},
"order": b24.Params{
"lastName": "ASC",
"name": "ASC",
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("crm.item.list: %w", err)
}
// The method wraps the response in an object with the "items" key.
raw, ok := b24.Unwrap(res.Result, "items")
if !ok {
return fmt.Errorf("no items key in the response")
}
var items []struct {
ID b24.ID `json:"id"`
AssignedByID b24.ID `json:"assignedById"`
StageID string `json:"stageId"`
Opportunity int `json:"opportunity"`
SourceID string `json:"sourceId"`
Title string `json:"title"`
}
if err := json.Unmarshal(raw, &items); err != nil {
return fmt.Errorf("parse response: %w", err)
}
for _, it := range items {
fmt.Println(it.ID)
}
Example Request with Date Filter Using OR Logic
Filter deals entityTypeId = 2 by two create dates. For each date, we set a range from the start to the end of the day.
For clarity, we will select only the necessary fields:
idIDtitleTitlecreatedTimeCreate date
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"entityTypeId":2,"select":["id","title","createdTime"],"filter":{"0":{"logic":"OR","0":{">=createdTime":"2025-10-31T00:00:00+02:00","<createdTime":"2025-11-01T00:00:00+02:00"},"1":{">=createdTime":"2025-02-28T00:00:00+02:00","<createdTime":"2025-03-01T00:00:00+02:00"}}}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.item.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"entityTypeId":2,"select":["id","title","createdTime"],"filter":{"0":{"logic":"OR","0":{">=createdTime":"2025-10-31T00:00:00+02:00","<createdTime":"2025-11-01T00:00:00+02:00"},"1":{">=createdTime":"2025-02-28T00:00:00+02:00","<createdTime":"2025-03-01T00:00:00+02:00"}}},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.item.list
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame, ISODate } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
type CrmItem = {
id: number
title: string
createdTime: ISODate | null
}
// Shape of the payload returned in result (match the "response handling" section of the page)
type CrmItemListResult = {
items: CrmItem[]
}
try {
// crm.item.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make<CrmItemListResult>({
method: 'crm.item.list',
params: {
entityTypeId: 2,
select: ['id', 'title', 'createdTime'],
filter: {
'0': {
logic: 'OR',
'0': {
'>=createdTime': '2025-10-31T00:00:00+02:00',
'<createdTime': '2025-11-01T00:00:00+02:00',
},
'1': {
'>=createdTime': '2025-02-28T00:00:00+02:00',
'<createdTime': '2025-03-01T00:00:00+02:00',
},
},
},
start: 0,
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info('Fetched items:', result.items.length, result.items)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getCrmItemListByDate() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// crm.item.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make({
method: 'crm.item.list',
params: {
entityTypeId: 2,
select: ['id', 'title', 'createdTime'],
filter: {
'0': {
logic: 'OR',
'0': {
'>=createdTime': '2025-10-31T00:00:00+02:00',
'<createdTime': '2025-11-01T00:00:00+02:00',
},
'1': {
'>=createdTime': '2025-02-28T00:00:00+02:00',
'<createdTime': '2025-03-01T00:00:00+02:00',
},
},
},
start: 0,
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info('Fetched items:', result.items.length, result.items)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getCrmItemListByDate)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.crm.item.list(
entity_type_id=2,
select=[
"id",
"title",
"createdTime",
],
filter={
"0": {
"logic": "OR",
"0": {
">=createdTime": "2025-10-31T00:00:00+02:00",
"<createdTime": "2025-11-01T00:00:00+02:00",
},
"1": {
">=createdTime": "2025-02-28T00:00:00+02:00",
"<createdTime": "2025-03-01T00:00:00+02:00",
},
},
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$entityTypeId = 2;
$order = [];
$filter = [
"0" => [
"logic" => "OR",
"0" => [
">=createdTime" => "2025-10-31T00:00:00+02:00",
"<createdTime" => "2025-11-01T00:00:00+02:00",
],
"1" => [
">=createdTime" => "2025-02-28T00:00:00+02:00",
"<createdTime" => "2025-03-01T00:00:00+02:00",
],
],
];
$select = ['id', 'title', 'createdTime'];
$startItem = 0;
$itemsResult = $serviceBuilder
->getCRMScope()
->item()
->list($entityTypeId, $order, $filter, $select, $startItem);
foreach ($itemsResult->getItems() as $item) {
print("ID: " . $item->id . PHP_EOL);
print("Title: " . $item->title . PHP_EOL);
print("Created Time: " . $item->createdTime->format(DATE_ATOM) . PHP_EOL);
print(PHP_EOL);
}
} catch (Throwable $e) {
print("Error: " . $e->getMessage() . PHP_EOL);
}
BX24.callMethod(
'crm.item.list',
{
entityTypeId: 2,
select: ['id', 'title', 'createdTime'],
filter: {
'0': {
logic: 'OR',
'0': {
'>=createdTime': '2025-10-31T00:00:00+02:00',
'<createdTime': '2025-11-01T00:00:00+02:00',
},
'1': {
'>=createdTime': '2025-02-28T00:00:00+02:00',
'<createdTime': '2025-03-01T00:00:00+02:00',
},
},
},
},
function (result) {
if (result.error()) {
console.error('crm.item.list error', result.error());
return;
}
const { items } = result.data();
items.forEach((item) => {
console.log(`Deal #${item.id}: ${item.title} (${item.createdTime})`);
});
if (result.more()) {
result.next();
}
}
);
require_once('crest.php');
$result = CRest::call(
'crm.item.list',
[
'entityTypeId' => 2,
'select' => ['id', 'title', 'createdTime'],
'filter' => [
"0" => [
"logic" => "OR",
"0" => [
">=createdTime" => "2025-10-31T00:00:00+02:00",
"<createdTime" => "2025-11-01T00:00:00+02:00",
],
"1" => [
">=createdTime" => "2025-02-28T00:00:00+02:00",
"<createdTime" => "2025-03-01T00:00:00+02:00",
],
],
],
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "crm.item.list", b24.Params{
"entityTypeId": 2,
"select": []string{"id", "title", "createdTime"},
"filter": b24.Params{
"0": b24.Params{
"logic": "OR",
"0": b24.Params{
">=createdTime": "2025-10-31T00:00:00+02:00",
"<createdTime": "2025-11-01T00:00:00+02:00",
},
"1": b24.Params{
">=createdTime": "2025-02-28T00:00:00+02:00",
"<createdTime": "2025-03-01T00:00:00+02:00",
},
},
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("crm.item.list: %w", err)
}
// The method wraps the response in an object with the "items" key.
raw, ok := b24.Unwrap(res.Result, "items")
if !ok {
return fmt.Errorf("no items key in the response")
}
var items []struct {
ID b24.ID `json:"id"`
AssignedByID b24.ID `json:"assignedById"`
StageID string `json:"stageId"`
Opportunity int `json:"opportunity"`
SourceID string `json:"sourceId"`
Title string `json:"title"`
}
if err := json.Unmarshal(raw, &items); err != nil {
return fmt.Errorf("parse response: %w", err)
}
for _, it := range items {
fmt.Println(it.ID)
}
Response Handling
HTTP status: 200
{
"result": {
"items": [
{
"id": 253,
"assignedById": 6,
"stageId": "NEW",
"opportunity": 19000,
"sourceId": "WEB",
"title": "Lead #253",
"name": "Admin",
"lastName": null,
"isManualOpportunity": "Y"
},
{
"id": 255,
"assignedById": 1,
"stageId": "NEW",
"opportunity": 19600,
"sourceId": "WEB",
"title": "Lead #255",
"name": "Klaus",
"lastName": "Weber",
"isManualOpportunity": "Y"
},
{
"id": 252,
"assignedById": 1,
"stageId": "NEW",
"opportunity": 12000,
"sourceId": "ADVERTISING",
"title": "Lead #252",
"name": "Klaus",
"lastName": "Schmidt",
"isManualOpportunity": "Y"
},
{
"id": 254,
"assignedById": 6,
"stageId": "IN_PROCESS",
"opportunity": 19000,
"sourceId": "ADVERTISING",
"title": "Lead #254",
"name": "Schmidt",
"lastName": "Schmidt",
"isManualOpportunity": "Y"
}
]
},
"total": 4,
"time": {
"start": 1721724354.214286,
"finish": 1721724354.805263,
"duration": 0.5909769535064697,
"processing": 0.24513697624206543,
"date_start": "2024-07-23T10:45:54+02:00",
"date_finish": "2024-07-23T10:45:54+02:00",
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
The root element of the response. Contains a single key |
|
items |
Array with information about the found items. Returned fields depend on 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 request execution time |
By default, custom field names are passed and returned in camelCase, for example ufCrm2_1639669411830.
When passing the useOriginalUfNames parameter with the value Y, custom fields will be returned with their original names, for example UF_CRM_2_1639669411830.
Error Handling
HTTP status: 400, 403
{
"error": "INVALID_ARG_VALUE",
"error_description": "Invalid filter: field 'FIELD' is not allowed in filter"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
Action is allowed for intranet users only |
User is not an intranet user |
|
|
|
SPA not found |
Occurs when an invalid |
|
|
|
Invalid filter: field ' |
The field |
|
|
|
Invalid filter: field ' |
The value passed for field |
|
|
|
Invalid order: field ' |
The field |
|
|
|
Invalid order: allowed sort directions are |
The value |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it 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 CRM Item crm.item.add
- Update Item crm.item.update
- Get Element by Id crm.item.get
- Delete CRM Item: crm.item.delete
- Retrieve Fields of CRM Item crm.item.fields
- CRM Object Fields
- How to Attach a Task to an SPA
- How to Filter Items by Stage Name
- How to Retrieve a List of Activities from Deals
- How to Retrieve a List of Vendors