Added

Attendance API additions related to duration-only time tracking

Context

We are adding a new way in the product allowing to track attendance periods just with a duration and without specific start and end times.

Information about it is available in the “How attendance is recorded” section in Create time tracking policies – Personio

API changes

Get and List

In all v2 APIs returning attendance periods, for companies enabling duration-only time tracking, periods returned can have start be null, indicating a duration only period whose exact start and end time is unknown. Use duration to get period's durations and attribution_date to know which day such a period is on.

For backwards-compatibility, by default, this new type of duration-only periods are not returned from the LIST endpoint (/papi/v2/attendance-periods), but it is possible to query them using the duration_type filter parameter. For example, by specifying duration_type=DURATION_ONLY to return only duration-only periods, or duration_type=ALL to return all attendance periods (both tracking start and end time and tracking only durations).

Also note that, when filtering on start.date_time.lte / start.date_time.gte / end.date_time.lte / end.date_time.gte duration only periods are never returned, as they don't have a specific known start/end time.

Create

Attendance periods tracking only duration can be created using POST API by specifying duration (minimum 0, maximum 24h) and attribution_date fields. attribution_date is required exactly when duration is provided and exactly one of start or duration must be used in the same attendance period creation request.

Update

It is possible to update duration and/or attribution_date of an attendance period tracking only duration. To do that, the PATCH API can be used.

Note, that it is not possible to set start or end fields on existing duration-only attendance periods using PATCH request. Similarly, for existing periods tracking start and end time, it is not possible to set duration or attirubiton_date fields.