Discussions
Exposing rejected time-offs request to the public API
12 months ago by Hasan Ismail Yilmaz
Exposing rejected time-offs request to the public API
Hello Personio team,
Currently, there is no easy way of checking whether a previously created time-off has been rejected in personio, because the entries are deleted.
The only 2 ways to check if entries have been removed is
- polling GET /company/time-offs/{id} for each id that should be checked, and checking for 404
- polling GET /company/time-offs, and checking if the records returned still contain the id in question.
Both of which are quite a strain on the public API.
Some suggested ways to fix the issue
- Don't delete time-offs, just change the status field
- In the request GET /company/time-offs, if the updated_from parameter is set, send some sort of tombstone for the deleted ids
- In the request GET /company/time-offs, allow querying for a list of ids. (can still get quite large if a lot of time-offs need to be checked
I know you are currently testing webhooks in alpha, and I suspect you also plan on exposing webhooks for time-offs, but making this functionality available via the REST-API would be much appreciated.
Thanks in advance!