Sync absences
PayFit's Absences API lets you retrieve absences from PayFit and, when you have the right permissions, create or cancel absences in PayFit.
Use this guide to understand the main rules before integrating with absence endpoints. For endpoint paths, request bodies, filters, response formats, pagination, status codes, and error messages, use the API Reference.
What you can do
With the Absences API, you can:
- List absences for a company
- Retrieve absences for a specific contract
- Create an approved absence in PayFit
- Cancel an existing absence in PayFit
Absences cannot be updated through the API. To modify an absence, cancel the existing absence and create a new one with the updated information.
Required permissions
To read absences, your application needs the time:read scope.
To create or cancel absences, your application needs the time:write scope.
Reading absences
You can retrieve absences for a company, or for a specific employee contract.
By default, PayFit returns approved absences. You can use the API Reference to see the available filters, pagination parameters, and response fields.
When syncing absences, make sure your integration handles paginated results.
Creating absences
Absences created through the API are created as approved absences in PayFit.
If your system has an approval workflow, only send an absence to PayFit once it has been approved in your system. Do not send draft, pending, or unapproved absences to PayFit.
To create an absence, your integration must provide a supported absence type for the relevant country and employee configuration.
Cancelling absences
Use the cancel endpoint when an absence should no longer apply in PayFit.
If you need to change an absence, cancel the existing absence and create a new one with the updated information. There is no update endpoint for absences.
Absence types
Each absence must use a supported absence type. Absence types are country-specific and may also depend on the employee or company configuration in PayFit.
France
Supported absence types for France:
fr_conges_payes, fr_rtt, fr_repos, fr_sans_solde, fr_teletravail, fr_ecole, fr_maladie_ordinaire, fr_mariage_salarie, fr_pacs_salarie, fr_mariage_enfant, fr_mariage_frere_ou_soeur, fr_mariage_beau_frere_ou_belle_soeur, fr_mariage_ascendant, fr_mariage_petit_enfant, fr_deces_beau_pere_ou_belle_mere, fr_deces_conjoint, fr_deces_enfant, fr_deces_frere_ou_soeur, fr_deces_grand_parent, fr_deces_pere_ou_mere, fr_deces_beau_frere_ou_belle_soeur, fr_deces_gendre_ou_belle_fille, fr_deces_petit_enfant, fr_demenagement, fr_echographie_prenatale, fr_conjoint_malade_ou_hospitalise, fr_handicap_enfant, fr_examen_professionnel_formation_continue, fr_appel_preparation_defense, fr_ceremonie_enfant_communion_solennelle, fr_demarches_adoption
Spain
Supported absence types for Spain:
es_huelga, es_permiso_por_convenio_no_remunerado, es_permiso_parental, es_vacaciones, es_teletrabajo, es_descanso_horas_extras, es_descanso_por_festivo_trabajado, es_visita_medica, es_permiso_por_matrimonio, es_deber_inexcusable, es_examenes_prenatales, es_tecnicas_de_preparacion_al_parto, es_adopcion, es_mudanza, es_permiso_por_examenes, es_permiso_por_formacion, es_asuntos_propios, es_jornada_de_licencia, es_lactancia_acumulada, es_prematuros_hospitalizados, es_permiso_especial_fuerza_mayor, es_otro_asunto_personal, es_fallecimiento_pariente_de_primer_grado_de_consanguinidad, es_fallecimiento_pariente_de_segundo_grado_de_consanguinidad, es_hospitalizacion_de_un_familiar, es_intervencion_quirurgica_sin_hospitalizacion, es_accidente_o_enfermedad_grave, es_permiso_asistencia_a_matrimonio, es_fallecimiento_pariente_de_tercer_grado_de_consanguinidad, es_otro_asunto_familiar, es_permiso_por_horas
United Kingdom
Supported absence types for the United Kingdom:
uk_annual_leave, uk_remote, uk_sick_leave, uk_unpaid_leave, uk_compassionate_leave, uk_custom_leave_1, uk_custom_leave_2, uk_custom_leave_3, uk_custom_leave_4, uk_custom_leave_5
Common reasons a request can fail
When creating or cancelling absences, PayFit checks both the request format and payroll consistency rules.
A request can fail if:
- Required information is missing or invalid
- The start date or end date is invalid
- The end date is before the start date
- The absence overlaps with an existing absence
- The absence type is not supported or not enabled for the employee
- The employee or contract is not eligible for the absence
- The integration does not have the required permission
For the exact response format, status codes, and error messages, refer to the API Reference.
API Reference
Use the API Reference for technical implementation details:
- List absences
- Create absence
- Cancel absence
