In the sample website, we are able to get slots for both providers, so whenever a user books its automatically picks one of the provider and booking the slot. But the API allowing us to send only one provider ID. Following is the request that we send.
URL:https://user-api.simplybook.me/
METHOD: POST
BODY: {“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2021-04-16”,“2021-04-16”,5,1,1,null,[4]],“id”:1}
At first, thank you for the response. I have tried to get slots for the service with multiple providers,
It responded with slots but how would I get slots for each provider.
there is only 2 options with API: get available slots per list of providers and get slots just per one provider. If you need not merged slots per many providers then you need to call method above with different provider id many times
We tried getting available slots for both providers in our system by sending them in an array and we also get available slots
@/api/schedule/available-slots?service_id=2&date=2021-04-24&provider_id=1,2@
We pick 23 Apr as the date and book a time 7 AM (returned in API response), we again try 23 Apr as the date, but the 7 AM slot is not returned by API, it should return, right? because the other provider is available at that time and we send the provider ID in the request.
In case you use REST API you have to use correct GET params to pass array for example provider_id=1&provider_id=2 , provider_id=1,2 - incorrect format.
I am closing this thread. Please make separate ticket for each issue.