Migrated from Redmine #855 | Author: Leonardy Huang
Status: New | Priority: Normal | Created: 2022-03-24
Hi, just want to double-check if there is an API to set a day as a holiday/day-off for the entire company?
Thanks.
Migrated from Redmine #855 | Author: Leonardy Huang
Status: New | Priority: Normal | Created: 2022-03-24
Hi, just want to double-check if there is an API to set a day as a holiday/day-off for the entire company?
Thanks.
Redmine Admin wrote:
hi, you can use API documentation | SimplyBook.me Online Scheduling this method to set company workday info
Leonardy Huang wrote:
Redmine Admin wrote:
hi, you can use API documentation | SimplyBook.me Online Scheduling this method to set company workday info
Hi, thank you for the reply.
How can I set a specific day ie: 30 Mar 2022 as a holiday? I don’t see the date in the payload
{
"start_time":"10:00",
"end_time":"18:00",
"is_day_off":0,
"breaktime":[{"start_time":"14:00","end_time":"15:00"}],
"index":"1",
"name":"Monday",
"date":"",
"unit_group_id":"",
"event_id":""
}
Thanks.
Redmine Admin wrote:
hi,
"date":"",
there is a date in payload. You should pass name or date but only one of them. e.g.
{
"start_time":"10:00",
"end_time":"18:00",
"is_day_off":0,
"breaktime":[{"start_time":"14:00","end_time":"15:00"}],
"index":"1",
"name":"",
"date":"2022-03-30",
"unit_group_id":"",
"event_id":""
}
Leonardy Huang wrote:
Redmine Admin wrote:
hi,
[…]
there is a date in payload. You should pass name or date but only one of them. e.g.[…]
Sorry I missed that.
I tried calling the Function API via HTTPS (https://user-api.simplybook.vip/admin):
{
"jsonrpc": "2.0",
"method": "setWorkDayInfo",
"params": {
"start_time": "09:00",
"end_time": "18:00",
"is_day_off": 1,
"breaktime": [],
"index": "1",
"date": "2022-04-02",
"unit_group_id": "",
"event_id": ""
},
"id": 1
}
but I always get Access denied response:
{
"error": {
"code": -32600,
"message": "Access denied",
"data": []
},
"id": "1",
"jsonrpc": "2.0"
}
and the token I use is from the @getUserToken@ function (API documentation | SimplyBook.me Online Scheduling).
What did I do wrong? And, which fields are mandatory?
Thanks.