Discussions
GET v1/company/time-offs yields duplicate entry after paging to 8th page
8 months ago by Daniel Kudwien
Problem
GET v1/company/time-offs
yields a duplicate entry after paging to the 8th page.
API: https://developer.personio.de/reference/get_company-time-offs
Details
- The duplicate entry only appears when retrieving page 8 - so it must be a paging error inside of Personio: https://api.personio.de/v1/company/time-offs?limit=200&offset=8
- It would only be a client-side error if the duplicate entry would appear in the second page, because then we would be paging wrongly and would see repeating IDs in every page.
- We only started to see the duplicate key errors a few weeks ago (in February/March 2024).
Example
- Absence record ID
149239744
is returned as last entry on page 7 and as first entry on page 8.- It is the same record with the same ID and identical values.
- We are not using the updated_from and updated_to parameters.
Notes
- We had a similar case before, because the parameter offset is not actually starting with value 0 but 1 (and 0 is silently interpreted as 1). When paging from 0 to 1, we were receiving the same entries again. But we addressed this in our client already.