[#1194] Slots returning empty for provider

Migrated from Redmine #1194 | Author: Guilherme Bueno
Status: New | Priority: High, I’m very impatient | Created: 2024-03-12


When trying to get the available timeslots for one of our providers the request returns the date of today for the date but the slots are empty. Looking at SB’s dashboard we can see that the provider has available slots.

URL of the Request:
https://user-api-v2.simplybook.plus/admin/timeline/slots?date_from=2024-03-12&date_to=2024-03-12&provider_id=7&service_id=33&with_available_slots=1

Type: GET

headers:

“headers” => [
“X-Token” => “1f3de9dadd020c97deb6b47c42fce22d039d9a3b641c10817efd086595c005b2”
“X-Company-Login” => “santemedic1”
“Content-type” => “application/json; charset=utf-8”
]

Response:
[{“id”:“2024-03-12”,“date”:“2024-03-12”,“slots”:}]

Redmine Admin wrote:

please try to call this method without service id, intersection of service and provider’s schedule may not have slots

Guilherme Bueno wrote:

Before this is the answer provided, I’ve already tried changing the date_to parameter to tomorrow for example and it shows the same behaviour. All the other providers also have this same structure in their URL and they return their slots correctly, this seems to be an issue only on this specific provider for some reason

Guilherme Bueno wrote:

This worked, however we haven’t set any time slots to specific services, why would including the service id or not make a difference in our case?

Redmine Admin wrote:

e.g. if service cannot be performed by provider API will return no slots. Please check your service settings and its schedule