For AI agents: markdown of this page — /docs-content-en/entities/booking-resources/list.md documentation index — /llms.txt

List booking resources

GET /v1/booking-resources

Returns the booking resources available to the key. This is the only way to learn the values for the mandatory resourceIds field when creating a booking — start here if you are creating your first booking.

The method returns the whole catalog at once and accepts no pagination parameters: meta.total always equals the length of data, and meta.hasMore is always false.

Parameters

Parameter Type Required Default Description
ParametertypeId (query) Typenumber Requiredno Default— DescriptionKeep only resources of one type. A positive integer in canonical form
ParametersearchQuery (query) Typestring Requiredno Default— DescriptionBitrix24 substring search. A non-empty string of at most 200 characters

The parameters may be combined. Any other parameter, a repeated parameter, or an array- or object-shaped form (typeId[], filter[typeId]) is rejected with 400 INVALID_PARAMS before Bitrix24 is contacted.

Sorting is deliberately not exposed: the walk always goes by ascending id, and a caller-controlled order would break the completeness guarantee of the response.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/booking-resources?typeId=1" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/booking-resources?typeId=1" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-resources?typeId=1', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { data, meta } = await res.json()
console.log(`Resources available: ${meta.total}`)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-resources?typeId=1', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data, meta } = await res.json()
console.log(`Resources available: ${meta.total}`)

From the resource list to a booking, in one scenario:

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-resources?searchQuery=meeting', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { data } = await res.json()
console.log(`Resources available: ${data.length}`)

const room = data.find(r => r.isMain === 'Y') ?? data[0]

await fetch('https://vibecode.bitrix24.com/v1/bookings', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    resourceIds: [room.id],
    datePeriod: {
      from: { timestamp: 1723446900, timezone: 'Europe/Berlin' },
      to: { timestamp: 1723447800, timezone: 'Europe/Berlin' },
    },
  }),
})

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of booking resources
Fielddata[].id Typenumber DescriptionResource identifier. This is the value that goes into a booking's resourceIds
Fielddata[].name Typestring DescriptionResource name
Fielddata[].typeId Typenumber DescriptionResource type identifier. The same value the typeId filter accepts
Fielddata[].isMain Typestring DescriptionThe main-resource flag of the Bitrix24 record: "Y" or "N"
Fieldmeta.total Typenumber DescriptionNumber of returned records. Always equals the length of data
Fieldmeta.hasMore Typeboolean DescriptionAlways false — a successful response holds the whole catalog within the cap

The description field is withheld deliberately: it is free-form text from the Bitrix24 account that may contain personal data and internal notes, and it is not needed to pick a resource. Notification and template settings are not returned either.

The response carries the Cache-Control: private, no-store header — the content is bound to the Bitrix24 account and to the identity of the key.

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Meeting room for 6",
      "typeId": 1,
      "isMain": "Y"
    },
    {
      "id": 3,
      "name": "Meeting room with a projector",
      "typeId": 1,
      "isMain": "N"
    }
  ],
  "meta": {
    "total": 2,
    "hasMore": false
  }
}

Error response example

400 — an unknown parameter was passed:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Only typeId and searchQuery are supported query parameters."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionAn unknown, repeated, array-shaped or malformed query parameter. The same code arrives when Bitrix24 itself rejected the filters
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not sent
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 tokens configured
HTTP403 CodeSCOPE_DENIED DescriptionThe key does not have the booking scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied access
HTTP403 CodeB24_TARIFF_RESTRICTION DescriptionThe Bitrix24 plan does not include booking resources
HTTP422 CodeBITRIX_METHOD_NOT_FOUND DescriptionThe booking module is unavailable on the portal
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request
HTTP429 CodeRATE_LIMITED DescriptionThe limit of 20 requests per minute per portal for this endpoint was exceeded, or the request rate limit to Bitrix24 was hit. The exact value arrives in the x-ratelimit-limit header (the cap is divided across replicas). See Retry-After
HTTP429 CodeOPERATION_TIME_LIMIT DescriptionThe Bitrix24 operation-time limit was exceeded
HTTP429 CodeQUEUE_OVERFLOW DescriptionThe portal's Bitrix24 queue is full and the request was refused immediately. See Retry-After
HTTP429 CodeQUEUE_TIMEOUT DescriptionThe request waited in the Bitrix24 queue past its timeout. See Retry-After
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionBitrix24 returned a response of an unexpected shape
HTTP502 CodeBITRIX_PAGINATION_INCOMPLETE DescriptionThe catalog walk did not converge, completeness is not guaranteed
HTTP502 CodeBITRIX_RESULT_TOO_LARGE DescriptionThe portal holds more than 500 resources. Narrow the lookup with typeId or searchQuery
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is temporarily unavailable
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not answer in time

No refusal contains partially collected data: the response is either complete or an error.

The full list of common API errors — Errors.

Known specifics

A truncated catalog is never returned. A Bitrix24 account whose catalog does not fit the cap gets a refusal rather than the first records: an incomplete list with no sign of incompleteness would read as the whole catalog. Narrow the lookup with filters.

Completeness is guaranteed for a catalog that did not change during the request. Bitrix24 provides no snapshot of the collection, so creating or deleting a resource while the walk is in progress can shift a page. The response then stays well-formed but may omit a just-created resource or still contain a just-deleted one.

Visibility is decided by Bitrix24. The method returns what the account shows to the identity behind the key. An employee key with the booking scope may call the method; whether its list matches an administrator's is decided by Bitrix24, not by the platform.

A read-only key works. The method only reads data, so read-only mode does not block it.

See also