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 ten 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 or pending 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 TypeCountryDescription
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_teletravailπŸ‡«πŸ‡·Remote work
fr_ecoleπŸ‡«πŸ‡·School leave
uk_annual_leaveπŸ‡¬πŸ‡§Annual leave
uk_remoteπŸ‡¬πŸ‡§Remote work
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_teletrabajoπŸ‡ͺπŸ‡ΈRemote work
es_otrosπŸ‡ͺπŸ‡ΈOther
colleague_leaveAllColleague leave
colleague_partial_leaveAllColleague partial leave
colleague_schoolAllColleague school leave
colleague_remoteAllColleague remote work
otherAllOther

Example Request

Here is an example of how to use the API to retrieve absences:

GET /v1/absences?contract_id={contract_id}&limit=10
Authorization: Bearer {api_token}

By adjusting the limit parameter, you can fetch the desired number of absence records.

For more detailed information, visit the PayFit API documentation.