[#605] admin/timeline/slots doesn't return proper slots

Migrated from Redmine #605 | Author: Julian Li
Status: Closed | Priority: High, I’m very impatient | Created: 2020-11-12


We have setup duration for our services but when we call the api, it doesn’t return what we expected.

Impacted company id:
chadstoneqa
qvbqa

One sample request, we call

https://user-api-v2.simplybook.me/admin/timeline/slots?date_from=2020-11-22&date_to=2020-11-22&service_id=8&with_available_slots=1
{
date_from: ‘2020-11-22’,
date_to: ‘2020-11-22’,
service_id: ‘8’,
with_available_slots: 1
}

response:

[{“id”:“2020-11-22”,“date”:“2020-11-22”,“slots”:[{“id”:“10:00:00”,“time”:“10:00:00”,“available_count”:1,“total_count”:1},{“id”:“11:00:00”,“time”:“11:00:00”,“available_count”:1,“total_count”:1},{“id”:“12:00:00”,“time”:“12:00:00”,“available_count”:1,“total_count”:1},{“id”:“13:00:00”,“time”:“13:00:00”,“available_count”:1,“total_count”:1},{“id”:“14:00:00”,“time”:“14:00:00”,“available_count”:1,“total_count”:1},{“id”:“15:00:00”,“time”:“15:00:00”,“available_count”:1,“total_count”:1}]}]

Could you please have a look?

Cheers,
Julian

Dmytro Bondarev wrote:

Hi! Can you please explain what did you expect and why you think it is not correct response?

Julian Li wrote:

Dmitry Bondarev wrote:

Hi! Can you please explain what did you expect and why you think it is not correct response?

We set 5 mins duration for the service, we expect to receive time slots like {“id”:“10:00:00”,“time”:“10:00:00”,“available_count”:1,“total_count”:1}, {“id”:“10:05:00”,“time”:“10:05:00”,“available_count”:1,“total_count”:1} not slots with every hour.

By the way, the similar settings is working for our another account vicinitytest. That’s why we think it is a bug.

Let me know if it sounds clear to you?

Redmine Admin wrote:

service with id 8 now has duration 15+30 minutes

Julian Li wrote:

Redmine Admin wrote:

service with id 8 now has duration 15+30 minutes

For service id 12, we have duration with 2 hours, service id 13 with duration 3 hours and service 14 with duration 4 hours. but the api only returns slots with every hour like the sample response

[{“id”:“2020-11-22”,“date”:“2020-11-22”,“slots”:[{“id”:“10:00:00”,“time”:“10:00:00”,“available_count”:1,“total_count”:1},{“id”:“11:00:00”,“time”:“11:00:00”,“available_count”:1,“total_count”:1},{“id”:“12:00:00”,“time”:“12:00:00”,“available_count”:1,“total_count”:1},{“id”:“13:00:00”,“time”:“13:00:00”,“available_count”:1,“total_count”:1},{“id”:“14:00:00”,“time”:“14:00:00”,“available_count”:1,“total_count”:1},{“id”:“15:00:00”,“time”:“15:00:00”,“available_count”:1,“total_count”:1}]}]

the api returns the same result no matter if we config the duration. As I said, the similar settings is working for our another account.

Dmytro Bondarev wrote:

You have enabled Appointment at fixed time, with relevant settings.
So everything is correct.

Julian Li wrote:

Dmitry Bondarev wrote:

You have enabled Appointment at fixed time, with relevant settings.
So everything is correct.

Thanks for the information!

Julian Li wrote:

Please close this ticket as we turned that settings off and it works