Answered

Work schedule data (API)

  • 14 December 2021
  • 1 reply
  • 190 views

Userlevel 1
Badge +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?

icon

Best answer by Marc 14 December 2021, 16:34

View original

1 reply

Userlevel 4
Badge +12

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

Your reply