Sync Absences
How to retrieve absences in your PayFit API?
Overview
PayFit's API allows you to fetch the complete list of absences for a company or an individual employee using the contract ID. By default, the API returns the last 10 absences, sorted by the modification date. You can customize the number of results using the appropriate query parameter.
Absence Details
The API provides all validated absences, regardless of type, for all supported countries (France, UK, Spain).
Absence Types
Below is the table listing all possible absence types, their corresponding countries, and their descriptions:
Absence Type | Country | Description |
---|---|---|
fr_conges_payes | π«π· | Paid leave |
fr_rtt | π«π· | RTT leave |
fr_absence_remuneree | π«π· | Paid absence |
fr_repos | π«π· | Rest day |
fr_sans_solde | π«π· | Unpaid leave |
fr_maladie_ordinaire | π«π· | Ordinary sickness |
fr_accident_travail | π«π· | Work accident |
fr_accident_trajet | π«π· | Commuting accident |
fr_maladie_professionnelle | π«π· | Occupational disease |
fr_temps_partiel_therapeutique | π«π· | Therapeutic part-time |
fr_paternite | π«π· | Paternity leave |
fr_maternite | π«π· | Maternity leave |
fr_second_parent | π«π· | Second parent leave |
fr_pathologique | π«π· | Pathological leave |
fr_naissance | π«π· | Birth leave |
fr_enfant_malade | π«π· | Child sickness leave |
fr_parental_education | π«π· | Parental education leave |
fr_mariage | π«π· | Marriage leave |
fr_deces | π«π· | Death leave |
fr_deuil | π«π· | Mourning leave |
fr_mise_a_pied | π«π· | Suspension |
fr_activite_partielle | π«π· | Partial activity leave |
fr_autre | π«π· | Other leave |
fr_ecole | π«π· | School leave |
uk_annual_leave | π¬π§ | Annual leave |
uk_maternity | π¬π§ | Maternity leave |
uk_paternity | π¬π§ | Paternity leave |
uk_kit | π¬π§ | Keeping in touch days |
uk_adoption | π¬π§ | Adoption leave |
uk_sick_leave | π¬π§ | Sick leave |
uk_covid | π¬π§ | COVID-19 related leave |
uk_paid_leave | π¬π§ | Paid leave |
uk_jury_service | π¬π§ | Jury service leave |
uk_unpaid_leave | π¬π§ | Unpaid leave |
uk_compassionate_leave | π¬π§ | Compassionate leave |
uk_bereavement_leave | π¬π§ | Bereavement leave |
es_vacaciones | πͺπΈ | Vacations |
es_visita_medica | πͺπΈ | Medical visit |
es_asunto_personal | πͺπΈ | Personal matters |
es_asunto_familiar | πͺπΈ | Family matters |
es_cuidado_de_hijos | πͺπΈ | Childcare leave |
es_permisos | πͺπΈ | Permissions |
es_compensacion_dias_trabajados | πͺπΈ | Compensation for worked days |
es_baja_medica | πͺπΈ | Medical leave |
es_otros | πͺπΈ | Other |
colleague_leave | All | Colleague leave |
colleague_partial_leave | All | Colleague partial leave |
colleague_school | All | Colleague school leave |
colleague_remote | All | Colleague remote work |
other | All | Other |
Example Request
Here is an example of how to use the API to retrieve absences:
GET /companies/abcdefabcdefabcdefabcdef/absences?contractId=aaaaaaaaaaaaaaaaaaaaaaaa&maxResults=50
Authorization: Bearer {api_token}
By adjusting the maxResults
parameter, you can fetch the desired number of absence records.
For more detailed information, visit the PayFit API reference.
Updated 2 months ago