[#952] schedule/available-slots - How to use count?

Migrated from Redmine #952 | Author: Endris Formularis
Status: New | Priority: High, I’m very impatient | Created: 2022-10-28


Hi,

We are having problems with finding available slots on a specific date using the REST API. It works when we use count=1, but it does not work when count is higher than 1.

Whenever count > 1 we receive an empty list ()

My question is: How do we use count properly?

We are using Custom Feature: Group Bookings: Max 30, Min 1 and Limit bookings: Max bookings 30 for all services.

The API documentation does not specify what exactly count matches on behind the scenes in simplybookme. Is it something about our configuration or does it just not work properly..?

Examples:
https://user-api-v2.simplybook.me/admin/schedule/available-slots?date=2022-11-08&service_id=2&count=1
returns:
[
{
“id”: “2022-11-08 08:00:00”,
“date”: “2022-11-08”,
“time”: “08:00:00”
},
{
“id”: “2022-11-08 13:30:00”,
“date”: “2022-11-08”,
“time”: “13:30:00”
}
]

While:
https://user-api-v2.simplybook.me/admin/schedule/available-slots?date=2022-11-08&service_id=2&count=4 (any number >1)
returns:

Redmine Admin wrote:

hi, count > 1 is needed when you have multiple slots per provider and need to book more than 1 slot