What are you trying to achieve?
I want to sync sick leaves in an HR system to an our registration systeem. the sickleave has a start- and enddate, but the hour registration needs a record for every date inbetween. From the startdate to (so not including) the enddate.
When I have the dates, I need to check if there are hour registration for those dates in the MySQL hour registration table.
I’m not sure how to set this up.
Steps taken so far
I already have the HTTP to the HR system and the MySQL connection to the hour registration system. I do get the sickleave response from the HR system.
The output looks a bit like:
{
“ID”: “e862080a-4f1f-40c5-ae5c-d259db063253”,
“PersonId”: “82e4a5a1-601b-45e9-ac4c-52ea58ea737a”,
“StartDate”: “2025-03-14T00:00:00Z”,
“EndDate”: “2025-03-18T00:00:00Z”,
“Reason”: “Ziekte”,
“ComplaintCode”: null,
“ComplaintDescription”: “Migraine”,
“StartTime”: null,
“IsFullDay”: true,
“ReportDate”: “2025-03-14T16:44:00Z”,
But the enddate can also be empty, when they’re still sick. Then we should fill the hour registration for today also.