Get Resource Bookings by Filter calendar.resource.booking.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:
calendarWho can execute the method: any user
This method retrieves resource bookings based on a filter.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
filter* |
Filter fields |
Filter Parameter
Required parameters are marked with *
|
Name |
Description |
|
resourceTypeIdList* |
List of resource identifiers. Identifiers can be obtained using the method calendar.resource.list |
|
from |
Start date of the period |
|
to |
End date of the period |
|
resourceIdList* |
List of resource booking identifiers from the custom field of type Identifiers can be obtained via:
To find out which custom fields have the type |
In the method calendar.resource.booking.list, you must use only one of the two required parameters: resourceTypeIdList or resourceIdList. Both parameters cannot be used together.
Code Examples
Example 1. Assess resource availability over a period, for instance, to create custom views of availability or for use in application logic.
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"resourceTypeIdList":[10852,10888,10873,10871,10853],"from":"2024-06-20","to":"2024-08-20"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/calendar.resource.booking.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"resourceTypeIdList":[10852,10888,10873,10871,10853],"from":"2024-06-20","to":"2024-08-20"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/calendar.resource.booking.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
// Shape of each booking returned in result[]
type ResourceBooking = {
ID: string
PARENT_ID: string
DELETED: string
CAL_TYPE: string
OWNER_ID: string
NAME: string
DATE_FROM: string
DATE_TO: string
TZ_FROM: string
TZ_TO: string
TZ_OFFSET_FROM: string
TZ_OFFSET_TO: string
DATE_FROM_TS_UTC: string
DATE_TO_TS_UTC: string
DT_SKIP_TIME: string
DT_LENGTH: number
EVENT_TYPE: string
CREATED_BY: string
DATE_CREATE: string
TIMESTAMP_X: string
DESCRIPTION: string
IS_MEETING: boolean
MEETING_STATUS: string
MEETING_HOST: string
VERSION: string
SECTION_ID: string
DATE_FROM_FORMATTED: string
DATE_TO_FORMATTED: string
SECT_ID: string
RESOURCE_BOOKING_ID: string
}
try {
// calendar.resource.booking.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<ResourceBooking[]>({
method: 'calendar.resource.booking.list',
params: {
filter: {
resourceTypeIdList: [10852, 10888, 10873, 10871, 10853],
from: '2024-06-20',
to: '2024-08-20',
},
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('Bookings on this page:', result.length, result)
}
} 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 fetchResourceBookings() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// calendar.resource.booking.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: 'calendar.resource.booking.list',
params: {
filter: {
resourceTypeIdList: [10852, 10888, 10873, 10871, 10853],
from: '2024-06-20',
to: '2024-08-20',
},
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('Bookings on this page:', result.length, result)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', fetchResourceBookings)
</script>
try {
$response = $b24Service
->core
->call(
'calendar.resource.booking.list',
[
'filter' => [
'resourceTypeIdList' => [10852, 10888, 10873, 10871, 10853],
'from' => '2024-06-20',
'to' => '2024-08-20',
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
// Your logic for processing data
processData($result);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error fetching resource booking list: ' . $e->getMessage();
}
BX24.callMethod(
'calendar.resource.booking.list',
{
filter: {
resourceTypeIdList: [10852, 10888, 10873, 10871, 10853],
from: '2024-06-20',
to: '2024-08-20',
}
}
);
require_once('crest.php');
$result = CRest::call(
'calendar.resource.booking.list',
[
'filter' => [
'resourceTypeIdList' => [10852, 10888, 10873, 10871, 10853],
'from' => '2024-06-20',
'to' => '2024-08-20'
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Example 2. Select bookings by their identifiers from custom fields of the CRM entity.
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"resourceIdList":[10,18,17]}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/calendar.resource.booking.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"resourceIdList":[10,18,17]},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/calendar.resource.booking.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
// Shape of each booking returned in result[]
type ResourceBooking = {
ID: string
PARENT_ID: string
DELETED: string
CAL_TYPE: string
OWNER_ID: string
NAME: string
DATE_FROM: string
DATE_TO: string
TZ_FROM: string
TZ_TO: string
TZ_OFFSET_FROM: string
TZ_OFFSET_TO: string
DATE_FROM_TS_UTC: string
DATE_TO_TS_UTC: string
DT_SKIP_TIME: string
DT_LENGTH: number
EVENT_TYPE: string
CREATED_BY: string
DATE_CREATE: string
TIMESTAMP_X: string
DESCRIPTION: string
IS_MEETING: boolean
MEETING_STATUS: string
MEETING_HOST: string
VERSION: string
SECTION_ID: string
DATE_FROM_FORMATTED: string
DATE_TO_FORMATTED: string
SECT_ID: string
RESOURCE_BOOKING_ID: string
}
try {
// calendar.resource.booking.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<ResourceBooking[]>({
method: 'calendar.resource.booking.list',
params: {
filter: {
resourceIdList: [10, 18, 17],
},
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('Bookings on this page:', result.length, result)
}
} 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 fetchResourceBookings() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// calendar.resource.booking.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: 'calendar.resource.booking.list',
params: {
filter: {
resourceIdList: [10, 18, 17],
},
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('Bookings on this page:', result.length, result)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', fetchResourceBookings)
</script>
try {
$response = $b24Service
->core
->call(
'calendar.resource.booking.list',
[
'filter' => [
'resourceIdList' => [10, 18, 17]
]
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
// Your logic for processing data
processData($result);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error fetching resource booking list: ' . $e->getMessage();
}
BX24.callMethod(
'calendar.resource.booking.list',
{
filter: {
resourceIdList: [10, 18, 17]
}
}
);
require_once('crest.php');
$result = CRest::call(
'calendar.resource.booking.list',
[
'filter' => [
'resourceIdList' => [10, 18, 17]
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": [
{
"ID": "1408",
"PARENT_ID": "1408",
"DELETED": "N",
"CAL_TYPE": "resource",
"OWNER_ID": "0",
"NAME": "Booking",
"DATE_FROM": "20.12.2024 00:00:00",
"DATE_TO": "21.12.2024 00:00:00",
"TZ_FROM": "Europe/Riga",
"TZ_TO": "Europe/Riga",
"TZ_OFFSET_FROM": "7200",
"TZ_OFFSET_TO": "7200",
"DATE_FROM_TS_UTC": "1734652800",
"DATE_TO_TS_UTC": "1734739200",
"DT_SKIP_TIME": "Y",
"DT_LENGTH": 172800,
"EVENT_TYPE": "#resourcebooking#",
"CREATED_BY": "1",
"DATE_CREATE": "18.12.2024 13:55:35",
"TIMESTAMP_X": "18.12.2024 13:55:35",
"DESCRIPTION": "Service: some",
"IS_MEETING": false,
"MEETING_STATUS": "Y",
"MEETING_HOST": "0",
"VERSION": "1",
"SECTION_ID": "198",
"DATE_FROM_FORMATTED": "Fri Dec 20 2024",
"DATE_TO_FORMATTED": "Sat Dec 21 2024",
"SECT_ID": "198",
"RESOURCE_BOOKING_ID": "10"
},
{
"ID": "1409",
...
}
],
"time": {
"start": 1733318565.183275,
"finish": 1733318565.695058,
"duration": 0.5117831230163574,
"processing": 0.29406094551086426,
"date_start": "2024-12-04T13:22:45+00:00",
"date_finish": "2024-12-04T13:22:45+00:00"
}
}
Returned Data
|
Name |
Description |
|
result |
Array of objects. Each object describes a booking |
Booking Object
Technically, a booking is a calendar event. The method retrieves a set of fields similar to those of a calendar event. Some fields remain empty as they are not relevant for bookings. Below are only the relevant or filled fields.
|
Name |
Description |
|
ID |
Booking identifier |
|
PARENT_ID |
For a booking object, always equal to the |
|
DELETED |
Flag indicating whether the booking is deleted. Possible values:
|
|
CAL_TYPE |
Type of calendar in which the booking is located |
|
OWNER_ID |
For a booking object, always equals |
|
NAME |
Name of the booking |
|
DATE_FROM |
Start date of the booking |
|
DATE_TO |
End date of the booking |
|
TZ_FROM |
Timezone of the start date of the booking |
|
TZ_TO |
Timezone of the end date of the booking |
|
TZ_OFFSET_FROM |
Time offset of the start of the booking relative to UTC in seconds |
|
TZ_OFFSET_TO |
Time offset of the end of the booking relative to UTC in seconds |
|
DATE_FROM_TS_UTC |
Start date and time of the booking in UTC in timestamp format |
|
DATE_TO_TS_UTC |
End date and time of the booking in UTC in timestamp format |
|
DT_SKIP_TIME |
Flag indicating whether the booking lasts all day. Possible values:
|
|
DT_LENGTH |
Duration of the booking in seconds |
|
EVENT_TYPE |
Type of booking |
|
CREATED_BY |
Identifier of the user who created the booking |
|
DATE_CREATE |
Creation date of the booking |
|
TIMESTAMP_X |
Date of modification of the booking |
|
DESCRIPTION |
Description of the booking |
|
IS_MEETING |
For a booking object, always |
|
MEETING_STATUS |
For a booking object, always |
|
MEETING_HOST |
For a booking object, always |
|
VERSION |
Version of booking changes |
|
SECTION_ID |
Identifier of the resource in which the booking is located |
|
DATE_FROM_FORMATTED |
Formatted start date of the booking |
|
DATE_TO_FORMATTED |
Formatted end date of the booking |
|
SECT_ID |
Identifier of the resource in which the booking is located |
|
RESOURCE_BOOKING_ID |
Booking identifier |
Error Handling
HTTP Status: 400
{
"error": "",
"error_description": "The required parameter "filter['resourceTypeIdList']" is not set for the method "calendar.resource.booking.list""
}
|
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 |
Error Message |
Description |
|
Empty string |
Access denied |
Access to the method is prohibited for external users |
|
Empty string |
The required parameter "filter['resourceTypeIdList']" is not set for the method "calendar.resource.booking.list" |
Neither of the required parameters: |
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
- Resource Booking: Overview of Methods
- Add a new resource calendar.resource.add
- Update resource calendar.resource.update
- Get a list of all resources calendar.resource.list
- Delete Resource calendar.resource.delete