Skip to main content
Answered

API Absences, not working for me.

  • December 17, 2021
  • 6 replies
  • 317 views

Forum|alt.badge.img+1

Hi.

I just realized only some absences/timeoffs are passed through API, the ones that are whole-day absences. The hour-absences are not shown through API, which renders the whole idea useless and I don’t see any point in it, it’s just confusing.

Maybe I’m doing something wrong, but i’ve checked the API permissions, there is no distinctions between whole-day and hours absences. Does it work for you?

https://api.personio.de/v1/company/time-offs?start_date=2021-11-01&end_date=2021-11-30&limit=200&employees[]=XXXXX

Best answer by Marc

Hi @ammar,

as the feature is quite new, currently it is not possible to retrieve hourly absences through the API, but the product team is already validating this idea.

Best regards
Marc

6 replies

Marc
Former Personio Employee
Forum|alt.badge.img+12
  • Former Personio Employee
  • Answer
  • December 21, 2021

Hi @ammar,

as the feature is quite new, currently it is not possible to retrieve hourly absences through the API, but the product team is already validating this idea.

Best regards
Marc


Charlotte W.
Personio Product Manager
Forum|alt.badge.img
  • Personio Product Manager
  • August 19, 2022

Hey @ammar! Happy to let you know that you can now read hourly absences (in a daily breakdown format) through the API with /absence-periods. You can learn more through the documentation here

If you have any feedback about the new endpoint, please let us know. 


Forum|alt.badge.img+1
  • Author
  • Explorer
  • August 21, 2022

@Charlotte W. that’s cool, but if I want to have a list of such absences in my local database, do I have to delete and insert ALL of the records? Is there a more reasonable way for know if an absence entry is still valid or if it has been deleted then deleting all and inserting all?


Charlotte W.
Personio Product Manager
Forum|alt.badge.img
  • Personio Product Manager
  • August 22, 2022

@ammar We don’t return deleted absence periods in any of the endpoints (daily or hourly). In order to cross-compare whether a period exists, you can use the period ID. 


Forum|alt.badge.img+1
  • Author
  • Explorer
  • August 22, 2022

@ammar We don’t return deleted absence periods in any of the endpoints (daily or hourly). In order to cross-compare whether a period exists, you can use the period ID. 

But in order to compare, I need to retrieve ALL the records for the period I want to cross-compare, right? 
Any plans to upgrade the API/endpoint to differential method? It would also help your hardware load, as people wouldn’t have to retrieve all the data multiple times a day, just to find out if a record has been deleted.


  • Getting Started
  • May 25, 2023

Any news about “soft-delete” or “archived” TimeOff’s? The “/company/absence-periods” Endpoint does not work as well?