لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/bookings/wait-list.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Move a booking to the wait list

POST /v1/bookings/:id/wait-list

Moves a booking to the wait list: creates a wait list record with the booking's clients and deletes the booking itself, freeing up the resource's time slot.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionBooking identifier. List: GET /v1/bookings

No request body is needed.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bookings/49/wait-list" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bookings/49/wait-list" \
  -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/49/wait-list', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log('Wait list record ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bookings/49/wait-list', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
console.log('Wait list record ID:', data.id)

Response fields

On success, the HTTP status is 201 Created and the response contains the new wait list record.

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata.id Typenumber DescriptionIdentifier of the new wait list record. The record's clients are returned by GET /v1/booking-wait-list/:id/clients
Fielddata.note Typestring | null DescriptionNote on the record. null — no note

Response example

JSON
{
  "success": true,
  "data": {
    "id": 33,
    "note": "Call back after 16:00"
  }
}

Error response example

404 — there is no booking with this id, for example because it has already been moved to the wait list:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Booking record not found"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionThere is no booking with this id, including one already moved to the wait list. Message Booking record not found
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer. Message id must be a canonical positive safe integer
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is not passed
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe key does not have the booking scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is in read-only mode
HTTP429 CodeRATE_LIMITED DescriptionRequest rate exceeded. The effective cap is in the x-ratelimit-limit header
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionBitrix24 returned a response of an unexpected shape. If this happened while re-reading the record after the move, the booking has already been deleted and the wait list record created — find it in the list of wait list records before retrying

Full list of common API errors — Errors.

Known specifics

The wait list record is created anew. The new record has its own id. If the booking was created from the wait list, the new record gets the previous note.

See also