[#436] Add break time method

Migrated from Redmine #436 | Author: Developers True Quit
Status: New | Priority: Normal | Created: 2019-11-06


Hi there,

Do you have any API for creating a break time?

I’m using setWorkDayInfo which use to create a special day.

I’m using ‘the weekly schedule’ to setup non-working day for our provider, but if we add a special day to the specified day and the specified day turn to ‘working day’. I don’t want to this

Thank you,

Redmine Admin wrote:

Hi, there are many examples for setWorkDayInfo usage which can also add breaktimes.

You can use search to get more Search - API - Simplybook.me support for developers

Redmine Admin wrote:

you need to pass only index not date to this method to NOT create special date. But make sure to pass full list of breaktimes, otherwise old breaktimes will be deleted.

Developers True Quit wrote:

Redmine Admin wrote:

you need to pass only index not date to this method to NOT create special date. But make sure to pass full list of breaktimes, otherwise old breaktimes will be deleted.

Could you please give me the example request for this ?

Thank you

Redmine Admin wrote:

$info = [
        "start_time"=>"10:00",
        "end_time"=>"17:00",
        "is_day_off"=>0,
        "breaktime"=>["start_time"=>"14:00","end_time"=>"15:00"],
        "index"=>"5",
        "name"=>"",
    ];

Developers True Quit wrote:

Redmine Admin wrote:

[…]

How can we create a break time for the specified date, not weekly ?

Redmine Admin wrote:

you need to pass date instead of index there

Developers True Quit wrote:

Developers True Quit wrote:

Redmine Admin wrote:

[…]

How can we create a break time for the specified date, not weekly ?

For example: date = 2019-11-08 and break time = 10:00:00 - 11:00:00, is this will be break time or special day?

Redmine Admin wrote:

$info = [
“start_time”=>“10:00”,
“end_time”=>“17:00”,
“is_day_off”=>0,
“breaktime”=>[“start_time”=>“10:00”,“end_time”=>“11:00”],
“name”=>“”,
“date”=>“2019-11-08”,
];

This will be special day. If index passed then it will be weekly settings

Developers True Quit wrote:

Redmine Admin wrote:

$info = [
“start_time”=>“10:00”,
“end_time”=>“17:00”,
“is_day_off”=>0,
“breaktime”=>[“start_time”=>“10:00”,“end_time”=>“11:00”],
“name”=>“”,
“date”=>“2019-11-08”,
];

This will be special day. If index passed then it will be weekly settings

Thank you,

What does the first param (start_time) and the second param (end_time) ?

Redmine Admin wrote:

there is no way to add breaktime only, you need to provide all settings for the day. Start time and end time are open period settings