Solutions
worksection
beta
help
Setting and removing users' non-working days via API: update_users_schedule
Sample update_users_schedule request
?action=update_users_schedule&data={"[email protected]":{"07.06.2021":"vacation",
"08.06.2021":"vacation"}, "3993":{"2021-06-12":"unset"}}Setting and removing users' dates of vacations, sick leaves, and weekend work days*changes are reflected in users' "Schedule" window
Required parameters:
- data — list of users with a separate set of dates for each
User emails or their IDs are supported (available via get_users method). Date formats DD.MM.YYYY and YYYY-MM-DD are supported.
Available values for managing dates
vacation — set vacation
sick-leave — set sick leave
workday — set working day on a weekend
unset — remove the set value
Provided value overwrites previously set one; using unset beforehand is not required.
Example
JSON response
If the request succeeds, the response will contain ok status and the following data:
{
"status": "ok",
"data": [],
"message": "Days added: 2, days updated: 1"
}
Leave your review
Did this article help you?
Glad we could help! What was helpful?
Sorry this didn't help. What went wrong?