Skip to content
Documentation
Explore guides

For administrators

Absences

List, create, show, update, and delete absences in the company.

Contents

Before you start

Send Accept: application/json and Authorization: Bearer YOUR_TOKEN to https://{subdomain}.talentohq.com. See API for authentication.

Path and query identifiers are UUID strings.

Successful responses use 200. Validation failures use 422. Missing or invalid tokens, and records that cannot be found, use 401.

List all absences

GET /api/v3/absences

Results are paginated. Pass page to move through pages of 50 records.

Response 200

[
  {
    "id": "e269dd36-bb60-41ac-9242-6ec7afe4c640",
    "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
    "absence_category_name": "Holiday",
    "employee_id": "3ed57043-3894-43e9-a03b-69883506a3d6",
    "employee_name": "Employee name",
    "all_day": true,
    "start_on": "2024-05-20",
    "end_on": "2024-06-04",
    "start_hour": null,
    "end_hour": null,
    "description": null,
    "total_minutes": 0,
    "total_days": "7.0"
  },
  {
    "id": "14902d70-c2f8-4796-8d33-cb996e1702b2",
    "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
    "absence_category_name": "Holiday",
    "employee_id": "1ae2fd31-da27-434e-92f2-b8f4480b57a8",
    "employee_name": "Employee name",
    "all_day": true,
    "start_on": "2024-05-20",
    "end_on": "2024-06-04",
    "start_hour": null,
    "end_hour": null,
    "description": null,
    "total_minutes": 0,
    "total_days": "8.0"
  }
]

Create an absence

POST /api/v3/absences

Request

{
  "employee_id": "3ed57043-3894-43e9-a03b-69883506a3d6",
  "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
  "all_day": false,
  "start_on": "2023-07-20",
  "end_on": "2023-07-21",
  "start_hour": "09:00",
  "end_hour": "10:00",
  "description": "absence description"
}

Response 200

{
  "id": "e269dd36-bb60-41ac-9242-6ec7afe4c640",
  "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
  "absence_category_name": "Holiday",
  "employee_id": "3ed57043-3894-43e9-a03b-69883506a3d6",
  "employee_name": "Employee name",
  "all_day": false,
  "start_on": "2023-07-20",
  "end_on": "2023-07-21",
  "start_hour": "09:00",
  "end_hour": "10:00",
  "description": "absence description",
  "total_minutes": 60,
  "total_days": 0
}

Show an absence

GET /api/v3/absences/{absence_id}

Parameter Type Description
absence_id string (UUID) Absence id.

Response 200

{
  "id": "e269dd36-bb60-41ac-9242-6ec7afe4c640",
  "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
  "absence_category_name": "Holiday",
  "employee_id": "3ed57043-3894-43e9-a03b-69883506a3d6",
  "employee_name": "Employee name",
  "all_day": true,
  "start_on": "2024-05-20",
  "end_on": "2024-06-04",
  "start_hour": null,
  "end_hour": null,
  "description": null,
  "total_minutes": 0,
  "total_days": "7.0"
}

Update an absence

PUT /api/v3/absences/{absence_id}

Request

{
  "end_hour": "11:00",
  "description": "absence updated description",
  "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f"
}

Response 200

{
  "id": "e269dd36-bb60-41ac-9242-6ec7afe4c640",
  "absence_category_id": "fc1b1403-0e47-4e6f-83f1-9734c5ab717f",
  "absence_category_name": "Holiday",
  "employee_id": "3ed57043-3894-43e9-a03b-69883506a3d6",
  "employee_name": "Employee name",
  "all_day": true,
  "start_on": "2024-05-20",
  "end_on": "2024-06-04",
  "start_hour": null,
  "end_hour": "11:00",
  "description": "absence updated description",
  "total_minutes": 0,
  "total_days": "7.0"
}

Delete an absence

DELETE /api/v3/absences/{absence_id}

Response 200

{}