People Absence Company Resource
The employee is taken from the stored record; only the period and reason change.
SessionId
64f8a0e2d5b7c9a1e3f4a5b6Absence period to register or correct
Employee e-mail. Give this or externalId when registering a new absence.
Employee id in the company's own HR system. Give this or email when registering.
First day of the absence, inclusive
Last day of the absence, inclusive. Omit while the employee is still on leave; on a correction, sending it closes an ongoing absence and omitting it reopens a closed one.
Reason for a period of absence: work accident or temporary disability
OK
A period of absence of one employee
Absence identifier (24-char hex)
Employee e-mail
Employee name
Employee id in the company's own HR system
First day of the absence, inclusive
Last day of the absence, inclusive. Null while the employee is still on leave.
True while the employee is still on leave, i.e. the absence has no end date yet
Reason for a period of absence: work accident or temporary disability
Duration in calendar days, both ends inclusive. This is the figure filters use. For an ongoing absence, the days elapsed up to today.
Duration in working days, derived from the employee's registered shift. Null when the employee has no shift registered. It is an estimate — no bank-holiday calendar exists — and it is never used for filtering. Counted up to today while ongoing.
PUT /api/v1/company/absences/{absenceId} HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"email": "text",
"externalId": "text",
"from": "2026-01-01",
"to": "2026-01-01",
"reason": "WORK_ACCIDENT"
}OK
{
"id": "text",
"email": "text",
"name": "text",
"externalId": "text",
"from": "2026-01-01",
"to": "2026-01-01",
"ongoing": true,
"reason": "WORK_ACCIDENT",
"calendarDays": 1,
"estimatedWorkingDays": 1
}SessionId
64f8a0e2d5b7c9a1e3f4a5b6OK
No content
DELETE /api/v1/company/absences/{absenceId} HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
OK
No content
A leave counts when it overlaps the window; it need not be contained in it.
SessionId
OK
A period of absence of one employee
Absence identifier (24-char hex)
Employee e-mail
Employee name
Employee id in the company's own HR system
First day of the absence, inclusive
Last day of the absence, inclusive. Null while the employee is still on leave.
True while the employee is still on leave, i.e. the absence has no end date yet
Reason for a period of absence: work accident or temporary disability
Duration in calendar days, both ends inclusive. This is the figure filters use. For an ongoing absence, the days elapsed up to today.
Duration in working days, derived from the employee's registered shift. Null when the employee has no shift registered. It is an estimate — no bank-holiday calendar exists — and it is never used for filtering. Counted up to today while ongoing.
GET /api/v1/company/absences HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
OK
[
{
"id": "text",
"email": "text",
"name": "text",
"externalId": "text",
"from": "2026-01-01",
"to": "2026-01-01",
"ongoing": true,
"reason": "WORK_ACCIDENT",
"calendarDays": 1,
"estimatedWorkingDays": 1
}
]SessionId
Absence period to register or correct
Employee e-mail. Give this or externalId when registering a new absence.
Employee id in the company's own HR system. Give this or email when registering.
First day of the absence, inclusive
Last day of the absence, inclusive. Omit while the employee is still on leave; on a correction, sending it closes an ongoing absence and omitting it reopens a closed one.
Reason for a period of absence: work accident or temporary disability
OK
A period of absence of one employee
Absence identifier (24-char hex)
Employee e-mail
Employee name
Employee id in the company's own HR system
First day of the absence, inclusive
Last day of the absence, inclusive. Null while the employee is still on leave.
True while the employee is still on leave, i.e. the absence has no end date yet
Reason for a period of absence: work accident or temporary disability
Duration in calendar days, both ends inclusive. This is the figure filters use. For an ongoing absence, the days elapsed up to today.
Duration in working days, derived from the employee's registered shift. Null when the employee has no shift registered. It is an estimate — no bank-holiday calendar exists — and it is never used for filtering. Counted up to today while ongoing.
POST /api/v1/company/absences HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"email": "text",
"externalId": "text",
"from": "2026-01-01",
"to": "2026-01-01",
"reason": "WORK_ACCIDENT"
}OK
{
"id": "text",
"email": "text",
"name": "text",
"externalId": "text",
"from": "2026-01-01",
"to": "2026-01-01",
"ongoing": true,
"reason": "WORK_ACCIDENT",
"calendarDays": 1,
"estimatedWorkingDays": 1
}Rows are processed independently: valid rows are stored even when others fail. The response reports every row — accepted, already existing, or rejected with the reason and its line number. A row identical to a stored absence is reported as already existing rather than as an error, so a corrected file can be uploaded whole.
SessionId
OK
Per-row outcome of an absence spreadsheet upload
Data rows read from the file, excluding the header
Rows stored by this upload
Rows describing an absence that was already stored, identical in every field
Rows giving the end date of an absence stored as still ongoing, which is now closed
Rows that could not be stored
POST /api/v1/company/absences/upload HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}OK
{
"totalRows": 1,
"accepted": 1,
"alreadyExisted": 1,
"closed": 1,
"rejected": 1,
"rows": [
{
"line": 1,
"outcome": "ACCEPTED",
"error": "text",
"employee": "text"
}
]
}Empty xlsx with the expected columns and a dropdown of the accepted reasons.
SessionId
OK
GET /api/v1/company/absences/template HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
OK
binaryLast updated