Create a presence or absence request
jethr_create_absence_requestCreate a leave, sickness, remote-work or other presence/absence request for an employee. WRITES to the company's HR records. codename is the request kind (from jethr_list_absence_policies); give start_date and end_date for day requests, or start_date + start_time + time_duration for hourly requests. send_notification=true makes Jet HR notify the people involved (approvers/employee) and needs confirm_notification=true; default false. Some kinds need extra fields (child data, trip data, sickness certificate): Jet HR answers with a validation error naming them. POST /public-api/v1/presence-absence-requests/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| puc | No | Sickness only: the PUC protocol number. | |
| note | No | Note on the request. | |
| codename | Yes | Request kind codename (from jethr_list_absence_policies), e.g. HOLIDAY. | |
| employee | Yes | Employee uuid (from jethr_list_employees). | |
| end_date | No | Last day (yyyy-mm-dd); omit for a single day. | |
| child_ssn | No | Child fiscal code (required for FEEDING, SICKNESS_CHILD_CHILD, SICKNESS_CHILD_INFANT). | |
| trip_name | No | Trip policy name (required for TRIP_* kinds; see jethr_list_trip_refund_policies). | |
| start_date | No | First day (yyyy-mm-dd). | |
| start_time | No | Start time HH:MM, hourly requests only. | |
| assisted_ssn | No | Fiscal code of the assisted person (kinds that need it, e.g. Law 104 leave). | |
| time_duration | No | Duration HH:MM, hourly requests only. | |
| child_birth_date | No | Child birth date (required for PARENTAL_PATERNAL_MANDATORY_LEAVE). | |
| send_notification | No | Notify the people involved (default false); needs confirm_notification=true. | |
| confirm_notification | No | Must be true when send_notification is true: the user approved that Jet HR notifies the people involved. | |
| trip_meals_reimbursed | No | TRIP_* kinds: meals are reimbursed. | |
| sickness_justification_type | No | Sickness only: PUC protocol number or paper certificate. | |
| donor_transfusion_center_ssn | No | Donor leave only: fiscal code of the transfusion center. | |
| trip_accommodation_reimbursed | No | TRIP_* kinds: accommodation is reimbursed. |