[#1114] How to implement classes booking through the API

Migrated from Redmine #1114 | Author: Marc Bernet
Status: New | Priority: High, I’m very impatient | Created: 2023-10-05


Hello,

I’m trying to book classes through the API, but I can’t find any documentation on this matter.
It seems that unlike services, the classes do not have a provider assigned with availability, so I understand that the process must be done differently.

Thank you.

Redmine Admin wrote:

to book a class you need to book service and provider because class is actually pair of service and provider linked together.

Marc Bernet wrote:

Redmine Admin wrote:

to book a class you need to book service and provider because class is actually pair of service and provider linked together.

Hello,

Thank you for your previous response. I understand that to book a class, I need to take into account both the service and the provider. However, I have specific concerns and questions that need addressing.

Difference between classes and regular services: From my observations, regular services operate based on specific time slots according to the provider. However, when creating a class in the backoffice, it doesn’t seem to be linked to any existing provider with a calendar. This causes confusion regarding how to handle class bookings as compared to regular service bookings.

Documentation and practical examples: I’ve gone through the provided link (API documentation | SimplyBook.me Online Scheduling), and I noticed that examples are centered around regular services. To proceed appropriately with integrating classes, I genuinely need a clearer understanding, either through additional documentation or specific examples for classes.

I understand that there might not be documentation available for classes at the moment, but it would be immensely helpful if you could provide a brief guide or insights on which endpoints or functions I should use to book a class on a specific date.

Clarity on this matter is essential for the success of our integration, and I would greatly appreciate your detailed assistance on this matter.

Thank you for your attention, and I look forward to your response.

Dmytro Bondarev wrote:

Hi,

You should book the same way as usual bookings, but passing event id and provider id of class.
You can call getUnitList, getEventList and pass relevant parameter
$handleClasses (1 - classes only, -1 without classes, null - skip classes check)