Migrated from Redmine #729 | Author: Fayaz Ahamed PA
Status: Rejected | Priority: Normal | Created: 2021-07-05
We are using custom UI using following method, but the available slots are different from SafeBuy (ABN: 17510261621) | Scheduling and Booking Website , in this application, we get lot more slots than the API response that we get.
AVAILABLE SLOTS
URL:
https://user-api-v2.simplybook.me/admin/schedule/available-slots
METHOD:
GET
HEADER:
server: nginx
date: Fri, 02 Jul 2021 06:04:14 GMT
content-type: application/json; charset=UTF-8
content-length: 269
access-control-allow-origin: *
access-control-allow-methods: POST, PUT, DELETE, GET, OPTIONS
access-control-allow-headers: content-type, x-company-login, x-token, x-requested-with x-xss-protection: 1; mode=block
QUERY:
service_id=5&provider_id=1&date=2021-07-13
RESPONSE:
[
{
“id”: “2021-07-13 07:00:00”,
“date”: “2021-07-13”,
“time”: “07:00:00”
},
{
“id”: “2021-07-13 09:30:00”,
“date”: “2021-07-13”,
“time”: “09:30:00”
},
{
“id”: “2021-07-13 12:00:00”,
“date”: “2021-07-13”,
“time”: “12:00:00”
},
{
“id”: “2021-07-13 14:30:00”,
“date”: “2021-07-13”,
“time”: “14:30:00”
}
]
Redmine Admin wrote:
Any employee is used in web version. In API you are getting slots for one provider only, that is why there is difference
Fayaz Ahamed PA wrote:
Even if we send multiple providers in request we get differences. For eg: I have checked July 12th with both providers and I got 4 responses from API, which is 7:00, 9:30, 12:00, & 2:00. But their application shows around 5 separations, like 7 to 8:30, 9 to 10:30, 11 to 12:30, 1 to 2:30, & 3 to 4:30.
system
July 5, 2021, 10:00am
4
Redmine Admin wrote:
please provide raw http requests and link used for available slot comparison
system
July 5, 2021, 10:13am
5
Fayaz Ahamed PA wrote:
AVAILABLE SLOTS:
URL:
https://user-api-v2.simplybook.me/admin/schedule/available-slots
METHOD: GET
HEADER:
server: nginx
date: Mon, 05 Jul 2021 09:44:25 GMT
content-type: application/json; charset=UTF-8
content-length: 269
access-control-allow-origin: *
access-control-allow-methods: POST, PUT, DELETE, GET, OPTIONS
access-control-allow-headers: content-type, x-company-login, x-token, x-requested-with
x-xss-protection: 1; mode=block
QUERY:
service_id=5&provider_id=1,2&date=2021-07-12
RESPONSE:
[
{
“id”: “2021-07-12 07:00:00”,
“date”: “2021-07-12”,
“time”: “07:00:00”
},
{
“id”: “2021-07-12 09:30:00”,
“date”: “2021-07-12”,
“time”: “09:30:00”
},
{
“id”: “2021-07-12 12:00:00”,
“date”: “2021-07-12”,
“time”: “12:00:00”
},
{
“id”: “2021-07-12 14:30:00”,
“date”: “2021-07-12”,
“time”: “14:30:00”
}
]
system
July 5, 2021, 10:19am
6
Redmine Admin wrote:
impossible to pass provider array such way
&provider_id=1,2
system
July 5, 2021, 10:20am
7
Redmine Admin wrote:
From doc API documentation | SimplyBook.me Online Scheduling
Request parameters:
int service_id - selected service id
int provider_id - selected provider id
please make calls according to documentation, there is no nativ support of any employee option in API. You need to get slots for each provider and join them
system
July 5, 2021, 10:21am
8
Redmine Admin wrote:
you can use provider_id =1&provider_id =2 to get slots for multiple providers