Hello Anton,
Here's the CalendarException entity description where you can see all possible fields:
Hello guys,
I am writing an integration using Clarizen API and I can mark the entire day as "non working" using Calendar Exceptions objects.
Now we also have a need to set only part of the day as "non-working", if a user had to take half a day off for example.
In the UI we can mark only part of the day as working.
The way the UI works is that you need to define the number of working days on a given day, and not "number of hours off".
How would I implement this using API?
From what I can tell in the available fields for the Calendar Exception Type you can set WorkingDay to True and AllDay to False. Now how would I provide the number of hours that user can work?
I am thinking of a simple "8 - requested hours off" kinda thing, but which parameter would I use?
I hope this makes sense.
Thank you
Please sign in to leave a comment.
Hello Anton,
Here's the CalendarException entity description where you can see all possible fields:
Roland, as far as I can see StartDate and EndDate are "Date" data type, which does not take "time" information.
I will try feeding it datetime instead of simple Date, let's hope this way we can mark part of the day as "working" and not the full day.
Despite the documentation, feeding the start and end dates with datetime did the trick.
data = {'entity':
{'Id': '/CalendarException',
'Name': 'Time off',
'WorkingDay': True,
'StartDate': '2021-05-05T09:00:00.0000000',
'EndDate': '2021-05-05T12:00:00.0000000',
'AllDay': False,
'EventCalendar': userid
},
'fields': []}