[#1314] setWorkDayInfo returns Access denied

Migrated from Redmine #1314 | Author: Ngoc Phung
Status: New | Priority: High, I’m very impatient | Created: 2024-11-25


my company url is https://magnettest.secure.nobia.enterpriseappointments.com/

I am trying to update provider’s schedule by using setWorkDayInfo

here is my request
{
“jsonrpc”: “2.0”,
“method”: “setWorkDayInfo”,
“params”: [
{
“start_time”: “12: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”: “235”,
“event_id”: “”
}
],
“id”: “1”
}

I am already passing X-Company-Login and X-Token to the header but it is still returning Access denied error.

Can you advise what I am missing?

Pls advise urgently, I really need to update my 200 designers within this week, so I am in very urgent right now :frowning:

Redmine Admin wrote:

it supposed to be X-User-Token API documentation | SimplyBook.me Online Scheduling

Ngoc Phung wrote:

no your doc is saying X-Token tho?

Ngoc Phung wrote:

okay trying both X-Token and X-User-Token but still doesnt work

Dmytro Bondarev wrote:

It means you used invalid token.
Please follow “User/Admin API (Company administration service) authorization” section.

Ngoc Phung wrote:

ahhha. work now after switch to admin token.

another question please, if I dont provide any unit_group_id or event_id, will it set the schedule for all providers of the company?

If not, how can I set schedule for all providers of a company? (just providers, not service)

Dmytro Bondarev wrote:

No, it will not.
You can make cycle per all providers and call the method.