---
updatedAt: 2026-06-29T09:41:37.000Z
agentTools:
  projectIndex: https://developers.payfit.io/llms.txt
---

# List absences 🌍

Returns the absences in a company. This list is paginated. The output can be filtered given some fields like contractId. By default, only approved absences are returned, but this can be changed by setting `status` filter.

\
**Required scopes**: *time:read*

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Partner API",
    "description": "An API to let third parties communicate with PayFit",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://partner-api.payfit.com",
      "description": "The PayFit API production server"
    }
  ],
  "paths": {
    "/companies/{companyId}/absences": {
      "get": {
        "operationId": "GET_absences",
        "summary": "List absences 🌍",
        "description": "Returns the absences in a company. This list is paginated. The output can be filtered given some fields like contractId. By default, only approved absences are returned, but this can be changed by setting `status` filter.\n\n\\\n**Required scopes**: *time:read*",
        "tags": [
          "Absences"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "companyId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The id of the company"
          },
          {
            "in": "query",
            "name": "nextPageToken",
            "required": false,
            "schema": {
              "title": "nextPageToken",
              "type": "string",
              "additionalProperties": false
            },
            "description": "The encoded pagination token"
          },
          {
            "in": "query",
            "name": "maxResults",
            "required": false,
            "schema": {
              "title": "maxResults",
              "type": "string",
              "additionalProperties": false,
              "default": "10"
            },
            "description": "Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10)"
          },
          {
            "in": "query",
            "name": "contractId",
            "schema": {
              "type": "string"
            },
            "description": "Filter by contractId.\n"
          },
          {
            "in": "query",
            "name": "status",
            "allowReserved": true,
            "schema": {
              "type": "string"
            },
            "description": "Filter by status. Defaults to `approved`. Multiple statuses can be provided, separated by commas, for example `status=approved,pending_approval`. If `all` is provided, all absences will be returned, regardless of their status. Possible statuses are: - approved - pending_approval - declined - cancelled - pending_cancellation\n"
          },
          {
            "in": "query",
            "name": "beginDate",
            "required": false,
            "description": "Defines the minimal begin date of absences to fetch. Every absences with params.beginDate <= absences.endDate will be included.",
            "example": "2021-01-25",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "required": false,
            "description": "Defines the maximal end date of absences to fetch. Every absences with params.endDate >= absences.startDate will be included.",
            "example": "2021-01-26",
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The absences of the collaborators in the company.",
            "content": {
              "application/json": {
                "schema": {
                  "title": "absences",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "absences"
                  ],
                  "properties": {
                    "absences": {
                      "type": "array",
                      "items": {
                        "title": "absence",
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Id of the absence."
                          },
                          "contractId": {
                            "type": "string",
                            "description": "Contract ID of the absence owner."
                          },
                          "startDate": {
                            "type": "object",
                            "description": "Date and moment of the day when the absence starts.",
                            "properties": {
                              "date": {
                                "type": "string",
                                "format": "date",
                                "description": "Date of the absence in the format YYYY-MM-DD"
                              },
                              "moment": {
                                "type": "string",
                                "enum": [
                                  "beginning-of-day",
                                  "middle-of-day",
                                  "end-of-day"
                                ],
                                "description": "Moment of the day when the absence starts."
                              }
                            },
                            "required": [
                              "date",
                              "moment"
                            ]
                          },
                          "endDate": {
                            "type": "object",
                            "description": "Date and moment of the day when the absence ends.",
                            "properties": {
                              "date": {
                                "type": "string",
                                "format": "date",
                                "description": "Date of the absence in the format YYYY-MM-DD"
                              },
                              "moment": {
                                "type": "string",
                                "enum": [
                                  "beginning-of-day",
                                  "middle-of-day",
                                  "end-of-day"
                                ],
                                "description": "Moment of the day when the absence ends."
                              }
                            },
                            "required": [
                              "date",
                              "moment"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of absences. Other is used when the type is not yet defined.",
                            "x-enum-name": "AbsenceType",
                            "enum": [
                              "fr_adoption",
                              "fr_conges_payes",
                              "fr_rtt",
                              "fr_absence_remuneree",
                              "fr_repos",
                              "fr_sans_solde",
                              "fr_maladie_ordinaire",
                              "fr_accident_travail",
                              "fr_accident_trajet",
                              "fr_maladie_professionnelle",
                              "fr_temps_partiel_therapeutique",
                              "fr_paternite",
                              "fr_maternite",
                              "fr_second_parent",
                              "fr_pathologique",
                              "fr_naissance",
                              "fr_enfant_malade",
                              "fr_parental_education",
                              "fr_mariage",
                              "fr_deces",
                              "fr_deuil",
                              "fr_mise_a_pied",
                              "fr_activite_partielle",
                              "fr_autre",
                              "fr_ecole",
                              "uk_annual_leave",
                              "uk_maternity",
                              "uk_paternity",
                              "uk_kit",
                              "uk_adoption",
                              "uk_sick_leave",
                              "uk_covid",
                              "uk_paid_leave",
                              "uk_jury_service",
                              "uk_unpaid_leave",
                              "uk_compassionate_leave",
                              "uk_bereavement_leave",
                              "es_vacaciones",
                              "es_visita_medica",
                              "es_asunto_personal",
                              "es_asunto_familiar",
                              "es_cuidado_de_hijos",
                              "es_permisos",
                              "es_compensacion_dias_trabajados",
                              "es_baja_medica",
                              "es_otros",
                              "colleague_leave",
                              "colleague_partial_leave",
                              "colleague_school",
                              "other"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "x-enum-name": "AbsenceStatus",
                            "enum": [
                              "approved",
                              "pending_approval",
                              "declined",
                              "cancelled",
                              "pending_cancellation"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "contractId",
                          "startDate",
                          "endDate",
                          "type",
                          "status"
                        ]
                      }
                    },
                    "meta": {
                      "title": "meta",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "nextPageToken": {
                          "type": "string",
                          "nullable": true
                        },
                        "count": {
                          "type": "integer",
                          "nullable": true
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "collaborators": {
                    "summary": "An example of absences",
                    "value": {
                      "meta": {
                        "nextPageToken": "eyJsaW1pdCI6NTAsIm9mZnNldCI6NTB9",
                        "count": 2
                      },
                      "absences": [
                        {
                          "id": "5f9b03f75a18101bd958591c",
                          "startDate": {
                            "date": "2020-01-01",
                            "moment": "beginning-of-day"
                          },
                          "endDate": {
                            "date": "2020-01-02",
                            "moment": "end-of-day"
                          },
                          "contractId": "5b59e7b282ddef55f860d322",
                          "type": "fr_conges_payes",
                          "status": "approved"
                        },
                        {
                          "id": "987654321",
                          "startDate": {
                            "date": "2020-01-03",
                            "moment": "beginning-of-day"
                          },
                          "endDate": {
                            "date": "2020-01-04",
                            "moment": "end-of-day"
                          },
                          "contractId": "5b59e7b282ddef55f860d323",
                          "type": "fr_conges_payes",
                          "status": "pending_approval"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 400,
                      "error": "Bad request",
                      "details": "Field \"id\" is required."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 401,
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 403,
                      "error": "Forbidden action",
                      "details": "Missing scope \"contracts:read\"."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 404,
                      "error": "Ressource not found",
                      "details": "The provided id is wrong"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "partner-api-oauth": [
              "time:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partner-api-oauth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://oauth.payfit.com/authorize",
            "tokenUrl": "https://oauth.payfit.com/token",
            "scopes": {
              "contracts:read": "Allow to read contracts information",
              "collaborators:contracts:write": "Allow to create contracts on a collaborator",
              "contracts:payslips:read": "Allow to read payslips",
              "contracts:time-information:read": "Allow to read time related information of contracts",
              "pension:read": "Allow to read pension documents",
              "collaborators:read": "Read general information of collaborators.",
              "collaborators:write": "Allow to create collaborators.",
              "collaborators:contracts:read": "Read contract information of collaborators.",
              "collaborators:management:read": "Read information about organisation and management.",
              "collaborators:meal-vouchers:read": "Read meal vouchers information of collaborators.",
              "collaborators:personal:read": "Read personal data of collaborators.",
              "collaborators:social-security:read": "Read the social security identifiers of collaborators.",
              "collaborators:legal-identity:read": "Read the legal identity information of collaborators.",
              "collaborators:bank-info:read": "Allow to read the bank info of collaborators.",
              "accounting:read": "Allow to read company accounting information",
              "payment-files:read": "Allow to read company payment file information",
              "time:read": "Allow to read time data",
              "time:write": "Allow to write time data",
              "health-insurance:read": "Allow to read health insurance contracts",
              "health-insurance:write": "Allow to write health insurance contracts"
            }
          }
        }
      }
    }
  }
}
```