List Workforce Absences
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"own_workforce_id": "<string>",
"external_employee_id": "<string>",
"type": "<string>",
"accident_id": {},
"accident_date": {},
"accident_context": {},
"absenteeism_id": {},
"absenteeism_start_date": {},
"absenteeism_end_date": {},
"absenteeism_hours": {},
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"file_id": {},
"file_name": {},
"status": {},
"organization_id": {}
}List Workforce Absences
Retrieve every absence and workplace accident record for the organization, unpaginated
GET
/
v1
/
own_workforce_absenteeisms_accidents
List Workforce Absences
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"own_workforce_id": "<string>",
"external_employee_id": "<string>",
"type": "<string>",
"accident_id": {},
"accident_date": {},
"accident_context": {},
"absenteeism_id": {},
"absenteeism_start_date": {},
"absenteeism_end_date": {},
"absenteeism_hours": {},
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"file_id": {},
"file_name": {},
"status": {},
"organization_id": {}
}← Own Workforce API
Return the absence and accident records of the header organization as a flat array.
Read the
This endpoint does not paginate and applies no row cap. Use List Workforce Absences Paginated unless you need the whole set at once, and narrow with
created_at_from / created_at_to when you do.These records are health data: sick-leave dates and hours, and the context of workplace accidents, each tied to an identifiable employee. That is special-category personal data under the GDPR. Do not log responses verbatim or cache them in shared stores, and restrict the API keys that can reach this endpoint.
One record, up to two events
A single record can describe an absence, an accident, or an accident that caused an absence. Which one it is shows in the fields, not in a discriminator:accident_id | absenteeism_id | Meaning |
|---|---|---|
| set | null | An accident with no sick leave |
| null | set | An absence not caused by a workplace accident |
| set | set | An accident that led to sick leave |
accident_* fields only when accident_id is set, and the absenteeism_* fields only when absenteeism_id is set.
type is free text, captured as it was imported, and is not a controlled vocabulary. In practice organizations use their own labels in their own language, so the same concept appears under many spellings. Do not switch on it. For a reliable split, use accident_id / absenteeism_id as above, or the own_workforce_accidents and own_workforce_absenteeism datasets in Query datasets.Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faQuery Parameters
array[string]
Filter by source upload file. The nil UUID
00000000-0000-0000-0000-000000000000 matches rows with no file.datetime
Only rows created at or after this instant
datetime
Only rows created on or before this instant, inclusive
string
Free-text search, up to 255 characters
Response
A bare JSON array.string
Record UUID
string
Employee the record belongs to
string
That employee’s identifier in your HR system
string
Free-text label as uploaded — see the note above
string | null
Set when the record includes a workplace accident
string | null
YYYY-MM-DD, when the accident happenedstring | null
in_labore (at work) or in_itinere (commuting). This one is a closed set.string | null
Set when the record includes an absence
string | null
First day of the absence
string | null
Last day. Null means the absence is open-ended.
number | null
Hours lost
string
User who created the record
string
ISO 8601 timestamp
string
ISO 8601 timestamp
string | null
Source upload file
string | null
Name of that file
string | null
Ingestion status:
active once ingested, loading while its job runs, error if that job failedstring | null
Owning organization. Populated on group-view responses only.
Example
curl -X GET "https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents?created_at_from=2026-01-01T00:00:00" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
}
response = requests.get(
"https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents",
headers=headers,
params={"created_at_from": "2026-01-01T00:00:00"},
timeout=120,
)
records = response.json()
accidents = [r for r in records if r["accident_id"]]
with_leave = [r for r in accidents if r["absenteeism_id"]]
print(f"{len(accidents)} accidents, {len(with_leave)} of them with sick leave")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID
};
axios.get('https://api.dcycle.io/v1/own_workforce_absenteeisms_accidents', {
headers,
params: { created_at_from: '2026-01-01T00:00:00' },
timeout: 120000
})
.then(({ data }) => {
const accidents = data.filter(r => r.accident_id);
const withLeave = accidents.filter(r => r.absenteeism_id);
console.log(`${accidents.length} accidents, ${withLeave.length} of them with sick leave`);
})
.catch(error => console.error(error));
Successful Response
[
{
"id": "6f2c8d13-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
"own_workforce_id": "550e8400-e29b-41d4-a716-446655440000",
"external_employee_id": "EMP-2024-001",
"type": "Accidente de Trabajo",
"accident_id": "7a3d9e24-5b6c-4d7e-8f90-2b3c4d5e6f70",
"accident_date": "2026-04-12",
"accident_context": "in_labore",
"absenteeism_id": "8b4e0f35-6c7d-4e8f-9a01-3c4d5e6f7081",
"absenteeism_start_date": "2026-04-13",
"absenteeism_end_date": "2026-04-25",
"absenteeism_hours": 80.0,
"created_by": "8a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2026-04-26T08:15:00",
"updated_at": "2026-04-26T08:15:00",
"file_id": "dd44ee55-ff66-4077-8188-99aabbccddee",
"file_name": "absences_2026.csv",
"status": "active",
"organization_id": null
}
]
Common Errors
401 Unauthorized
Cause: the key is invalid, or it does not belong to the organization inx-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.
{
"detail": "Invalid API key for organization",
"code": "INVALID_API_KEY"
}
403 Forbidden
Cause: the key’s owner is not an enabled member of the organization inx-organization-id.
{
"detail": "Logged User is not Member of Organization",
"code": "LOGGED_USER_NOT_MEMBER"
}
Related Endpoints
List absences paginated
The same data, in pages
Absences of an employee
Narrowed to one person
Was this page helpful?