Personnel Data
    Personnel Data
    • /company/attendances
      GET
    • /company/attendances
      POST
    • /company/attendances/{id}
      DELETE
    • /company/attendances/{id}
      PATCH
    • /company/employees
      GET
    • Create an employee
      POST
    • /company/employees/{employee_id}
      GET
    • /company/employees/{employee_id}/profile-picture/{width}
      GET
    • /company/time-off-types
      GET
    • /company/time-offs
      GET
    • /company/time-offs
      POST
    • /company/time-offs/{id}
      DELETE
    • /company/time-offs/{id}
      GET

      /company/time-offs

      POST
      /company/time-offs
      This endpoint is responsible for adding absence data for the company employees.

      Request

      Body Params application/json

      Examples

      Responses

      🟢201The absence period was created successfully
      application/json
      Body

      🟠400Invalid request
      🟠404Employee or Absence type not found
      🟠422Validation error
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.personio.de/v1/company/time-offs' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "comment": "string",
          "employee_id": 0,
          "end_date": "2019-08-24",
          "half_day_end": true,
          "half_day_start": true,
          "start_date": "2019-08-24",
          "time_off_type_id": 0
      }'
      Response Response Example
      201 - response
      {
          "data": {
              "attributes": {
                  "certificate": {
                      "status": "not-required"
                  },
                  "created_at": "2017-01-17T10:32:18+0100",
                  "days_count": 3,
                  "employee": {
                      "attributes": {
                          "email": {
                              "label": "Email",
                              "value": "michael.miller@demo.com"
                          },
                          "first_name": {
                              "label": "First name",
                              "value": "Michael"
                          },
                          "id": {
                              "label": "id",
                              "value": 4567
                          },
                          "last_name": {
                              "label": "Last name",
                              "value": "Miller"
                          }
                      },
                      "type": "Employee"
                  },
                  "end_date": "2017-12-29T00:00:00+0100",
                  "half_day_end": 0,
                  "half_day_start": 0,
                  "id": 12345,
                  "start_date": "2017-12-27T00:00:00+0100",
                  "status": "approved",
                  "time_off_type": {
                      "attributes": {
                          "id": 54321,
                          "name": "Vacation"
                      },
                      "type": "TimeOffType"
                  }
              },
              "type": "TimeOffPeriod"
          },
          "success": true
      }
      Modified at 2023-08-22 06:28:03
      Previous
      /company/time-offs
      Next
      /company/time-offs/{id}
      Built with