[#165] getStartTimeMatrix method not returning valid results

Migrated from Redmine #165 | Author: Dhananjay Sharma
Status: Closed | Priority: High, I’m very impatient | Created: 2018-05-17


This method ‘getStartTimeMatrix’ is supposed to return available booking slots. But for some unit ids it is not retuning anything even if there are many available slots. and for some unit it is returning all the slots even if some of those slots are already booked.

This is my Booking Website URL: http://learnmore.simplybook.me

Redmine Admin wrote:

we need raw http request and response to see what is wrong

Dhananjay Sharma wrote:

Redmine Admin wrote:

we need raw http request and response to see what is wrong

Hello,

I have following two scenarios -

Here eventId is 1 and unitId is 1 or 2. We have some appointments booked for some slots and need the list of remaining available slots.

#1

Request : https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=2&dateFrom=2018-05-21&dateTo=2018-05-21

Response :

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 12:00:00
[3] => 13:00:00
[4] => 15:00:00
[5] => 16:00:00
[6] => 17:00:00
)

)

This is perfect. There are two booking at 11:00 and 14:00 so they are not in the list.

#2 ----

Request: https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=2&dateFrom=2018-05-21&dateTo=2018-05-21

Response:

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 11:00:00
[3] => 12:00:00
[4] => 13:00:00
[5] => 14:00:00
[6] => 15:00:00
[7] => 16:00:00
[8] => 17:00:00
)

)

This is wrong. There is one booking at 12:00 PM but it is still in the list.

Dhananjay Sharma wrote:

Hello,

I have following two scenarios -

Here eventId is 1 and unitId is 1 or 2. We have some appointments booked for some slots and need the list of remaining available slots.

#1

Request : https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=1&dateFrom=2018-05-21&dateTo=2018-05-21

Response :

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 12:00:00
[3] => 13:00:00
[4] => 15:00:00
[5] => 16:00:00
[6] => 17:00:00
)

)

This is perfect. There are two booking at 11:00 and 14:00 so they are not in the list.

#2 ----

Request: https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=2&dateFrom=2018-05-21&dateTo=2018-05-21

Response:

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 11:00:00
[3] => 12:00:00
[4] => 13:00:00
[5] => 14:00:00
[6] => 15:00:00
[7] => 16:00:00
[8] => 17:00:00
)

)

This is wrong. There is one booking at 12:00 PM but it is still in the list.

Dhananjay Sharma wrote:

Dhananjay Sharma wrote:

Redmine Admin wrote:

we need raw http request and response to see what is wrong

Hello,

I have following two scenarios -

Here eventId is 1 and unitId is 1 or 2. We have some appointments booked for some slots and need the list of remaining available slots.

#1

Request : https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=1&dateFrom=2018-05-21&dateTo=2018-05-21

Response :

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 12:00:00
[3] => 13:00:00
[4] => 15:00:00
[5] => 16:00:00
[6] => 17:00:00
)

)

This is perfect. There are two booking at 11:00 and 14:00 so they are not in the list.

#2 ----

Request: https://myecomclub.com/members/inc/api/simply-book/index2.php?eventId=1&unitId=2&dateFrom=2018-05-21&dateTo=2018-05-21

Response:

stdClass Object
(
[2018-05-21] => Array
(
[0] => 09:00:00
[1] => 10:00:00
[2] => 11:00:00
[3] => 12:00:00
[4] => 13:00:00
[5] => 14:00:00
[6] => 15:00:00
[7] => 16:00:00
[8] => 17:00:00
)

)

This is wrong. There is one booking at 12:00 PM but it is still in the list.

Redmine Admin wrote:

this is not raw http request to our API but to your code. We need request to our API

Dhananjay Sharma wrote:

Redmine Admin wrote:

this is not raw http request to our API but to your code. We need request to our API

raw http request –

POST HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 97
X-Company-Login: learnmore
X-Token: 17c7d4635704cf46080da787ddbb2d26dd796ef97c66b9d69e24a89b8af505ea
Accept: application/json

{“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2018-05-21”,“2018-05-21”,1,2,1],“id”:4}

Redmine Admin wrote:

it is very possible your priver have more than one slot. If it have more than one slot then one booking will not block his available times

Redmine Admin wrote:

Appointment booking service and free online booking service you can see 10 available slots here

Dhananjay Sharma wrote:

Redmine Admin wrote:

Appointment booking service and free online booking service you can see 10 available slots here

Then what options do i have?. I need multiple providers as coaches and then book appointments for these providers with their clients separately.

Redmine Admin wrote:

Then what options do i have?
I hvae no idea what you have…

function getStartTimeMatrix returns available bookings slots and its result is correct

Redmine Admin wrote:

you may call getBookings () to get list of bookings

Dhananjay Sharma wrote:

Redmine Admin wrote:

you may call getBookings () to get list of bookings

“I need multiple providers as coaches and then book appointments for these providers with their clients separately.”

Is this possible maintaining appointment of multiple provides separately?

Redmine Admin wrote:

yes of course it is possible. But then you need to have one slot per provider, not 10

Dhananjay Sharma wrote:

Redmine Admin wrote:

yes of course it is possible. But then you need to have one slot per provider, not 10

Dear Sir,

Basically. I want many coaches use this “simplybook.me” account to manage their clients appointments. For that i want them to maintain their separate calendar slots. My question is –

  1. What if we create multiple services and assign a dedicated service provider for that service. Can we have 10 slots for each of these providers?
  2. Do we need to have separate “simplybook.me” account for each of my coaches to maintain their clients appointment?

Thank you.

Redmine Admin wrote:

Please make another ticket because this is not related to getStartTimeMatrix