#Bookings
Entity: booking | Scope: booking | Base path: /v1/bookings
SPA entity (camelCase field names) — field names pass through without transformation.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/bookings |
List all (with filter, sort, pagination) | booking.v1.booking.list |
GET |
/v1/bookings/:id |
Get by ID | booking.v1.booking.get |
POST |
/v1/bookings |
Create new | booking.v1.booking.add |
PATCH |
/v1/bookings/:id |
Update by ID | booking.v1.booking.update |
DELETE |
/v1/bookings/:id |
Delete by ID | booking.v1.booking.delete |
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
id |
number | yes | Идентификатор записи |
name |
name |
string | ||
description |
description |
string | ||
resourceIds |
resourceIds |
array | ||
datePeriod |
datePeriod |
string |
#Examples
#List
curl -X GET '/v1/bookings?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/bookings/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/bookings' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"value","description":"value","resourceIds":"value"}'
#Update
curl -X PATCH '/v1/bookings/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Delete
curl -X DELETE '/v1/bookings/123' \
-H 'X-Api-Key: YOUR_KEY'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"bookings","action":"list","params":{"limit":5}}]}'