POST
/
hris
/
absences
Authorization
Header
Body
curl --request POST \
  --url https://api.kombo.dev/v1/hris/absences \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Integration-Id: <x-integration-id>' \
  --data '{
  "employee_id": "wXJMxwDvPAjrJ4CyqdV9",
  "absence_type_id": "3YKtQ7qedsrcCady1jSyAkY1",
  "start_date": "2019-09-17",
  "end_date": "2019-09-21",
  "start_time": "08:30:00",
  "end_time": "16:00:00",
  "start_half_day": false,
  "end_half_day": false,
  "employee_note": "Visiting the aliens"
}'
{
  "status": "success",
  "data": {
    "id": "22st2Ji8XpncEYEak8mvQgQF",
    "remote_id": "1348",
    "employee_id": "JDdUy9kiH5APaGizFrgNmQjM",
    "approver_id": "AgXEispYPP1BbToHpqnqcpxy",
    "start_date": "2022-08-04",
    "end_date": "2022-08-05",
    "start_half_day": true,
    "end_half_day": false,
    "start_time": "13:15:00",
    "end_time": "17:00:00",
    "amount": 2,
    "unit": "DAYS",
    "status": "APPROVED",
    "employee_note": "Visiting my family.",
    "type_id": "xzZoKssDaMZAd62kxayzzQvD",
    "changed_at": "2022-08-07T14:01:29.196Z",
    "remote_deleted_at": "2022-08-07T14:01:29.196Z"
  }
}

Check this page for a detailed guide.

This endpoint requires the permission Manage absences to be enabled in your scope config.

Example Request Body

{
  "employee_id": "wXJMxwDvPAjrJ4CyqdV9",
  "absence_type_id": "3YKtQ7qedsrcCady1jSyAkY1",
  "start_date": "2019-09-17",
  "end_date": "2019-09-21",
  "start_half_day": false,
  "end_half_day": false,
  "employee_note": "Visiting the aliens",
  "start_time": "08:30:00",
  "end_time": "16:00:00"
}

Authorizations

Authorization
string
headerrequired

Create an API key on the Secrets page in the Kombo dashboard.

Headers

X-Integration-Id
string
required

ID of the integration you want to interact with.

Body

application/json
employee_id
string
required

The ID of the employee in Kombo or their ID in the remote system by prefixing it with remote: (e.g., remote:12312)

absence_type_id
string
required

The ID of the absence type in Kombo (not its remote_id).

status
enum<string>
default: REQUESTED

Specify if the absence should be created in the requested or approved state. Please note that some tools might approve absences automatically if they were created for an absence type that does not require approval. There are more edge cases that might cause an absence to be approved automatically.

Available options:
REQUESTED,
APPROVED
start_date
string

When the absence starts. This is a plain date (i.e., yyyy-MM-dd), all time information is discarded.

end_date
string

When the absence ends. This is a plain date (i.e., yyyy-MM-dd), all time information is discarded.

start_half_day
boolean
default: false

true if the absence should start in the middle of the day.

end_half_day
boolean
default: false

true if the absence should end in the middle of the day.

amount
number

Specifying this also requires specifying unit. This is supported by very few tools.

unit
enum<string>

Specifying this also requires specifying amount.

Available options:
HOURS,
DAYS
employee_note
string | null
required

A note describing the reason for this absence.

start_time
string

When the absence begins. Follows the format HH:mm or HH:mm:ss (e.g., 14:45:15). If start_time is specified, end_time has to be specified as well.

end_time
string

When the absence ends. Follows the format HH:mm or HH:mm:ss (e.g., 14:45:15). If end_time is specified, start_time has to be specified as well.

Response

200 - application/json
status
enum<string>
required
Available options:
success
data
object
required