[#355] Function getStartTimeMatrix doesn't show avaliable slots for specific day, though, the slots for that day are avaliable

Migrated from Redmine #355 | Author: Dan Dev
Status: Closed | Priority: Immediate, there is BUG! | Created: 2019-03-07


Hello!
We got a problem with gettiing avaliable interview slots (using Simplybook API) for tomorrow. When I go to our Simplybook calendar, I can see a lot of avaliable slots, but the function getStartTimeMatrix returns no result for the same day. I’m not sure whether some settings in Simplybook web interface could affect that or that’s a bug. I pass correct start date and end date when I call the function, but it returns an empty object for tomorrow, and shows avaliable slots only starting from Monday.

This is quite urgent issue as tomorrow is the last interview day for one of our services and we would like to provide our clients to book interviews for that day.
Thanks!

Redmine Admin wrote:

Hi, to be able to help you, please provide your company login, function arguments and its response. Please also check if response differs from your public booking page for same service, provider and date.

Dan Dev wrote:

Here is the code:

    $start_date = date("Y-m-d", strtotime("March 4, 2019 00:00:00"));
    $date_to = date("Y-m-d", strtotime("March 16, 2019 00:00:00"));
    
    $intervals = $client->getStartTimeMatrix($start_date, $date_to, 3);

Our company login is

    linguedo

Dan Dev wrote:

Here is the response:

stdClass Object
(
    [2019-03-04] => Array
        (
        )

    [2019-03-05] => Array
        (
        )

    [2019-03-06] => Array
        (
        )

    [2019-03-07] => Array
        (
        )

    [2019-03-08] => Array
        (
        )

    [2019-03-09] => Array
        (
        )

    [2019-03-10] => Array
        (
        )

    [2019-03-11] => Array
        (
            [0] => 09:00:00
            [1] => 10:00:00
            [2] => 11:00:00
            [3] => 12:00:00
            [4] => 15:00:00
        )

    [2019-03-12] => Array
        (
            [0] => 09:00:00
            [1] => 10:00:00
            [2] => 11:00:00
            [3] => 12:00:00
            [4] => 13:00:00
            [5] => 15:00:00
            [6] => 16:00:00
            [7] => 17:00:00
            [8] => 18:00:00
        )

    [2019-03-13] => Array
        (
            [0] => 09:00:00
            [1] => 10:00:00
            [2] => 11:00:00
            [3] => 12:00:00
            [4] => 15:00:00
        )

    [2019-03-14] => Array
        (
            [0] => 09:00:00
            [1] => 10:00:00
            [2] => 11:00:00
            [3] => 15:00:00
        )

    [2019-03-15] => 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
            [9] => 18:00:00
        )

    [2019-03-16] => Array
        (
        )

)

Dan Dev wrote:

I tired different time frames, in the example above you can see that I tried to get avaliable slots for period of time which includes a few day before the needed date and a few days after the date. The slots for the days before are empty (it’s reasonable), but why the tomorrw’s slots are empty?

Redmine Admin wrote:

could be some arror in function call, please provide raw http request

Redmine Admin wrote:

tomorrow slots are empty because Minimum allowed time before bookings is set to 2 days in your settings

Dan Dev wrote:

tomorrow slots are empty because Minimum allowed time before bookings is set to 2 days in your settings

Oh, I did suspect that something like that interfers with the code. Thanks!

Dan Dev wrote:

You can consider this issue to be solved!
Thanks!

Redmine Admin wrote:

Ok, good :slight_smile:

(Short original content)