Here at my company we would like to synchronize the time offs of the employees between our vacations request system and clockify.
To do so, I would need to create Time Off for each user in Clockify. This does not seem to be possible currently, as the time off is created for the user corresponding to the API key.
Is there a way to do that I do not see? What would you suggest?
The data structure of the Update balance call is :
{
“note”: “string”,
“userIds”: [
“string”
],
“value”: -10000 (value being the time off you are adding)
}
So you would really need the userIDs rather than their API keys. The API key you can use for this call would be either workspace Owner’s or and Admin’s key.
If the users have different values being added, you can simply run this call in a loop where each time it would take userID and value as variables for each run.
So what we are trying to achieve is to have the timeoffs synchronized between our holidays and part-time system and Clockify.
Ideally, these time offs should appear in Clockify with the accurate days the employee is off. This would greatly help the project managers with the schedule part of Clockify. Currently they replicate the timeoffs by hand to be able to properly plan the employee resource on each project.
I hope this is clear now. Your proposed solution to update the policy balance should not help in that case, if I am not mistaken?
This seems to definitely work out for our case (this endpoint is not shown in the doc I believe).
Getting the userId will not be an issue, I tested that already