Discussions
Incorrect current_page in metadata on multiple requests for Abscence endpoint
Greetings,
I'm working on an integration between Personio and an internal software developed by my own company and I'm running into a problem where I'm trying to use the response metadata to understand how many request in sequence I have to do to retrieve all the data necessary.
My very first request works correctly, I call:
https://api.personio.de/v1/company/time-offs?start_date=2023-01-01&end_date=2023-12-31&limit=200&offset=0
and receive:
which is what I'm expecting.
Once I calculate the new offset (I'm going 200 by 200 so the new offset in this case is 200) with the next request I receive a wrong value in the current_page parameter
https://api.personio.de/v1/company/time-offs?start_date=2023-01-01&end_date=2023-12-31&limit=200&offset=200
Out of curiosity I tried setting an absurd offset to see if the current page value is tied to the offset I pass to the request, so I tried https://api.personio.de/v1/company/time-offs?start_date=2023-01-01&end_date=2023-12-31&limit=200&offset=108600 and received
The same happens in the API reference page
I am also working with the employees endpoint but didn't have the same problem there.
Could you help me with the matter?
Kind regards and thank you in advance.