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

Booking fields

GET /v1/bookings/fields

Returns a description of all booking fields with their types and attributes.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/bookings/fields" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/bookings/fields" \
  -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/bookings/fields', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bookings/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { success, data } = await res.json()

Response fields

The label and description field captions are returned in English. Request headers do not switch the language.

Field Type RO Description
id number yes Booking ID
name string Booking name. May be null
description string Booking description. May be null
resourceIds array IDs of the reserved resources. Required on create. The array cannot be empty
datePeriod object Booking period. Required on create: from and to, each with timestamp in Unix seconds and timezone in IANA format. The nested schema is returned in properties, so the shape does not have to be guessed

Response example

GET /v1/bookings/fields returns field descriptions under the data.fields key, where each field is { type, readonly, label, description }, and fields required on creation also carry required: true. Fields of type object with a known nested shape also carry properties — a recursive schema of the nested keys. Field names are camelCase, as in API responses. Plus data.batch with the list of available batch operations.

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true, "label": "Booking ID", "description": "Unique identifier of the booking." },
      "name": { "type": "string", "readonly": false, "label": "Name", "description": "Name of the booking set by the user." },
      "description": { "type": "string", "readonly": false, "label": "Description", "description": "Text description of the booking with additional details." },
      "resourceIds": { "type": "array", "readonly": false, "required": true, "label": "Resource IDs", "description": "List of identifiers of the resources reserved by this booking." },
      "datePeriod": {
        "type": "object",
        "readonly": false,
        "required": true,
        "label": "Booking period",
        "description": "Time interval of the booking: {from: {timestamp, timezone}, to: {timestamp, timezone}}. timestamp is Unix seconds, timezone is an IANA zone name (e.g. UTC). All four nested keys are required on create.",
        "properties": {
          "from": { "type": "object", "properties": { "timestamp": { "type": "number" }, "timezone": { "type": "string" } } },
          "to": { "type": "object", "properties": { "timestamp": { "type": "number" }, "timezone": { "type": "string" } } }
        }
      }
    },
    "batch": ["create", "update", "delete"]
  }
}

Error response example

403 — missing scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'booking' scope"
  }
}

Errors

HTTP Code Description
403 SCOPE_DENIED The API key does not have the booking scope
401 MISSING_API_KEY The request was sent without the X-Api-Key header
401 TOKEN_MISSING The API key has no configured tokens
429 RATE_LIMITED Rate limit exceeded: 300 requests per minute per portal, all API keys of the portal share one limit. The exact value arrives in the x-ratelimit-limit header (the cap is divided across replicas). Retry after the delay in the Retry-After header

Full list of common API errors — Errors.

See also