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
curl "https://vibecode.bitrix24.com/v1/bookings/fields" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/bookings/fields" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
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
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 | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.fields |
Typeobject | DescriptionBooking field schema. The key is the field name. The value is an object with the keys type, readonly, label, description. Fields required on create carry required: true, and the datePeriod field carries a nested key schema in properties. All fields of the map are listed in the table below |
Fielddata.batch |
Typearray | DescriptionWrite actions available in POST /v1/bookings/batch: create, update, delete |
Fields of the `data.fields` map
| Field | Type | RO | Description |
|---|---|---|---|
Fieldid |
Typenumber | ROyes | DescriptionBooking ID |
Fieldname |
Typestring | RO | DescriptionBooking name. May be null |
Fielddescription |
Typestring | RO | DescriptionBooking description. May be null |
FieldresourceIds |
Typearray | RO | DescriptionIDs of the reserved resources. Required on create. The array cannot be empty |
FielddatePeriod |
Typeobject | RO | DescriptionBooking period. The declared write shape has from and to, each with timestamp in Unix seconds and timezone in IANA format. The nested schema is returned in properties; reads return ISO 8601 strings |
Response example
{
"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": "Booking period. The declared write example uses {from: {timestamp, timezone}, to: {timestamp, timezone}}: timestamp is Unix seconds and timezone is an IANA zone name (e.g. UTC). Read responses return ISO 8601 strings in from and to.",
"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:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'booking' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the booking scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe request was sent without the X-Api-Key header |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header |
For the full list of common API errors, see Errors.