Skip to main content
Answered

Work schedule data (API)

  • December 14, 2021
  • 1 reply
  • 249 views

Forum|alt.badge.img+1

Hello!

I need to (maschine) read the information when does who have a working day. I can obtain the work schedule information via API and this is the information it shows:

 

                "work_schedule": {

                    "label": "Work schedule",

                    "value": {

                        "type": "WorkSchedule",

                        "attributes": {

                            "id": 295076,

                            "name": "Teilzeit, 32h (8:00, Mo - Do)",

                            "valid_from": "2021-10-01",

                            "monday": "08:00",

                            "tuesday": "08:00",

                            "wednesday": "08:00",

                            "thursday": "08:00",

                            "friday": "00:00",

                            "saturday": "00:00",

                            "sunday": "00:00"

                        }

                    },

                    "type": "standard",

                    "universal_id": "work_schedule"

                }

 

Unfortunatelly, Personio API doesn’t delivery any holiday information so I have to try to guess the work days manually, but my realy question is regarding the “valid_from" Paraemter. The user has had one schedule priod to 2021-10-01 and one after. Only the later one is shown. This seems to be a bug. There is a “valid_from”, suggesting I should be getting also the previous ones. Is there any other way to obtain who is supposed to be working when?

Best answer by Marc

Hi @ammar,

what you retrieved above from the API is information about the assigned work schedule. The work schedule does not contain information about absences (neither in the API nor in Personio itself), if you want absence information, you can retrieve this information via the Absences API.

The request via the API provides only the current data and no historical information. So in this particular case, the valid_from shows when the current work schedule was assigned.

Best regards
Marc

View original

1 reply

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

Hi @ammar,

what you retrieved above from the API is information about the assigned work schedule. The work schedule does not contain information about absences (neither in the API nor in Personio itself), if you want absence information, you can retrieve this information via the Absences API.

The request via the API provides only the current data and no historical information. So in this particular case, the valid_from shows when the current work schedule was assigned.

Best regards
Marc