[#927] getAvailableUnits returns empty list when anything is booked at the requested time

Migrated from Redmine #927 | Author: Joshua Worth
Status: Closed | Priority: Immediate, there is BUG! | Created: 2022-09-08


My company is “cullenjewellery”. When I call:

getAvailableUnits(1, “2022-9-10 08:00:00”, 1)

it returns an empty list, but there are definitely available units at that time for that event as shown in the attached image. This is preventing me from booking multiple people into the same time slot.

It does return unit 1 as long as there’s nothing else booked at that time. If there is something else booked, it returns an empty list.

I can see the official simplybook iframe widget is able to just book without even knowing which unit is available on the browser side, but the API requires the unit ID when book() is called.
The getStartTimeMatrix function correctly tells me the time is available, so it should work.

Redmine Admin wrote:

hi, as we can see here https://cullenjewellery.simplybook.me/v2/#book/location/1/service/1/count/1/provider/any/date/2022-09-09/ there are no available units at Sep 09 08:00

Redmine Admin wrote:

ok, sorry, looked at wrong date. There are slots here https://cullenjewellery.simplybook.me/v2/#book/location/1/service/1/count/1/provider/any/date/2022-09-10.

Please provide date-time in following format “2022-09-10 08:00”

Joshua Worth wrote:

Please read the full ticket description. This is a real problem with your API, not with your embeddable iframe booking widget.

Redmine Admin wrote:

if you provide datetime in correct format it will return you unit ids, there is nothing about widget

Please provide date-time in following format “2022-09-10 08:00”

Joshua Worth wrote:

Thank you. Using “YYYY-MM-DD HH:MM:SS” solved the issue. The documentation says very little about the required formatting of date/time/date+time strings.