Skip to content

Latest commit

 

History

History
194 lines (144 loc) · 13.1 KB

File metadata and controls

194 lines (144 loc) · 13.1 KB

Online Booking: Overview of Methods and Events

{% note tip "" %}

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

{% endnote %}

Online booking is a tool for automating the reservation of resources: rooms, equipment, specialist services, and more. You can move clients between the waitlist and bookings, manage occupancy, and synchronize resources with external systems.

Quick navigation: all methods and events

User documentation: Booking: Getting Started

Online booking has three groups of methods: resources, waitlist, and booking. The methods are interconnected:

  • resources define what can be booked
  • the waitlist handles overload
  • booking methods record occupancy

{% note info "" %}

In the on-premise Bitrix24, methods can be used starting from the module version booking 25.300.0.

{% endnote %}

Getting Started

  1. Create a resource type using booking.v1.resourceType.add. A resource cannot be created without a type because the typeId parameter is required when creating a resource.
  2. Create a resource using booking.v1.resource.add.
  3. Configure the resource's time availability using booking.v1.resource.slots.set.
  4. Create a booking using booking.v1.booking.add. If no suitable time is available, add an entry to the waitlist using booking.v1.waitlist.add, then move it to a booking later using booking.v1.booking.createfromwaitlist.
  5. Link a client to the booking using booking.v1.booking.client.set, and link a CRM deal using booking.v1.booking.externalData.set.
  6. Subscribe to the section events so that the application is notified when objects are created, updated, or deleted.

Setting Up Resources

Resources are objects that can be booked: rooms, equipment, services. Methods in this group allow you to:

Working with the Waitlist

Use the waitlist when the desired resource is temporarily unavailable. Methods in this group allow you to:

Booking Resources

Booking is a confirmed reservation for a resource. Methods in this group allow you to:

Errors and Limitations

The booking.* methods can return REST system errors and Online Booking logic errors. When processing a response, consider these common situations:

  • authorization and access errors occur if the token is invalid, the application or webhook does not have the booking scope, or the user does not have access to the application
  • the Booking tool is disabled. Please contact your administrator. error means that an administrator has disabled Online Booking
  • code 1018 with the Empty resource collection error can occur when creating or modifying a booking if resources are not found or are unavailable at the specified time
  • code 1026 means that the time of the new or modified booking overlaps existing bookings and the resource rules do not allow such an overlap

System authorization, access, and limit errors are described in Error Codes. Other codes and causes are provided on the corresponding method pages.

Overview of Methods and Events {#all-methods}

Scope: booking

Who can execute the method: any user

Resource

#| || Method | Description || || booking.v1.resource.add | Adds a new resource || || booking.v1.resource.delete | Deletes a resource || || booking.v1.resource.get | Retrieves a resource || || booking.v1.resource.list | Retrieves a list of resources || || booking.v1.resource.update | Updates a resource || |#

Resource Type

#| || Method | Description || || booking.v1.resourceType.add | Adds a new resource type || || booking.v1.resourceType.delete | Deletes a resource type || || booking.v1.resourceType.get | Retrieves a resource type || || booking.v1.resourceType.list | Retrieves a list of resource types || || booking.v1.resourceType.update | Updates a resource type || |#

Time Slots for Resources

#| || Method | Description || || booking.v1.resource.slots.list | Retrieves the slot settings for a resource || || booking.v1.resource.slots.set | Sets slots for a resource || || booking.v1.resource.slots.unset | Removes slots for a resource || |#

Waitlist

#| || Method | Description || || booking.v1.waitlist.add | Adds to the waitlist || || booking.v1.waitlist.createfrombooking | Creates an entry in the waitlist from a booking || || booking.v1.waitlist.delete | Deletes an entry from the waitlist || || booking.v1.waitlist.get | Retrieves an entry from the waitlist || || booking.v1.waitlist.list | Retrieves a list of entries from the waitlist || || booking.v1.waitlist.update | Updates an entry in the waitlist || |#

Client in the Waitlist

#| || Method | Description || || booking.v1.waitlist.client.list | Retrieves a list of clients in the waitlist entry || || booking.v1.waitlist.client.set | Adds clients to the waitlist entry || || booking.v1.waitlist.client.unset | Removes clients from the waitlist entry || |#

Waitlist Relationships with Additional Objects

#| || Method | Description || || booking.v1.waitlist.externalData.list | Retrieves relationships for the waitlist entry || || booking.v1.waitlist.externalData.set | Sets relationships for the waitlist entry || || booking.v1.waitlist.externalData.unset | Removes relationships for the waitlist entry || |#

Booking

#| || Method | Description || || booking.v1.booking.add | Adds a booking || || booking.v1.booking.createfromwaitlist | Creates a booking from the waitlist || || booking.v1.booking.delete | Deletes a booking || || booking.v1.booking.get | Retrieves booking information || || booking.v1.booking.list | Retrieves a list of bookings || || booking.v1.booking.update | Updates a booking || |#

Client in Booking

#| || Method | Description || || booking.v1.booking.client.list | Retrieves a list of clients in the booking || || booking.v1.booking.client.set | Adds clients to the booking || || booking.v1.booking.client.unset | Removes clients from the booking || |#

Booking Relationships with Additional Objects

#| || Method | Description || || booking.v1.booking.externalData.list | Retrieves relationships for the booking || || booking.v1.booking.externalData.set | Sets relationships for the booking || || booking.v1.booking.externalData.unset | Removes relationships for the booking || |#

Auxiliary Methods

#| || Method | Description || || booking.v1.clienttype.list | Retrieves a list of client types || |#

Events

#| || Event | Triggered || || onBookingResourceTypeAdd | When a resource type is created manually or using booking.v1.resourceType.add || || onBookingResourceTypeUpdate | When a resource type is updated manually or using booking.v1.resourceType.update || || onBookingResourceTypeDelete | When a resource type is deleted using booking.v1.resourceType.delete || || onBookingResourceAdd | When a resource is created manually or using booking.v1.resource.add || || onBookingResourceUpdate | When a resource is updated manually or using booking.v1.resource.update, booking.v1.resource.slots.set, booking.v1.resource.slots.unset || || onBookingResourceDelete | When a resource is deleted manually or using booking.v1.resource.delete || || onBookingWaitListItemAdd | When a waitlist entry is created manually or using booking.v1.waitlist.add || || onBookingWaitListItemUpdate | When a waitlist entry is updated manually or using booking.v1.waitlist.update || || onBookingWaitListItemDelete | When a waitlist entry is deleted manually or using booking.v1.waitlist.delete || || onBookingAdd | When a booking is created manually or using booking.v1.booking.add or booking.v1.booking.createfromwaitlist || || onBookingUpdate | When a booking is updated manually or using booking.v1.booking.update || || onBookingDelete | When a booking is deleted manually or using booking.v1.booking.delete || |#