ConnectCloud Developers

Change or archive an absence type (hr:admin)

PUT /api/hr/v1/absence-types/{id}

Module: HR · operationId: updateAbsenceType · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)

The key is fixed. Vacation and time-account effects cannot change once absences use the type (409 in_use).

Parameters

Name In Type Required Description
id path string (uuid) yes

Request body

application/json (required)

  • key (string, required): Stable key of the type
  • name (string, required): Display name
  • allowHalfDays (boolean): Half days may be requested
  • archived (boolean): Archived: no longer offered for new data, kept for existing data
  • color (string): Semantic colour of the type in calendars (one of primary, info, success, warning, error, neutral)
  • countsAgainstVacation (boolean): Days of this type are taken from the vacation account
  • icon (string): Lucide icon (i-lucide-…)
  • id (string): Id of the absence type
  • paid (boolean): The absence is paid time
  • requiresApproval (boolean): Requests start as requested and need a decision; otherwise they are approved when entered
  • sensitive (boolean): Colleagues see only "abwesend"
  • sortOrder (integer): Position in lists (ascending)
  • timeEffect (string): credit: counts as worked; none: the time account pays (Überstundenabbau); reduce_target: no target (unpaid) (one of credit, none, reduce_target)
  • version (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example:

{
  "allowHalfDays": false,
  "archived": false,
  "color": "info",
  "countsAgainstVacation": false,
  "icon": "i-lucide-school",
  "id": "1a3c5e7a-9c1e-4a3c-8e5a-7c9e1a3c5e15",
  "key": "berufsschule",
  "name": "Berufsschule",
  "paid": true,
  "requiresApproval": false,
  "sensitive": false,
  "sortOrder": 80,
  "timeEffect": "credit",
  "version": 1
}

Responses

  • 200 Saved (application/json)
  • 400 Error (application/json)
  • 409 Error (application/json)

Fields of the 200 answer:

  • key (string, required): Stable key of the type
  • name (string, required): Display name
  • allowHalfDays (boolean): Half days may be requested
  • archived (boolean): Archived: no longer offered for new data, kept for existing data
  • color (string): Semantic colour of the type in calendars (one of primary, info, success, warning, error, neutral)
  • countsAgainstVacation (boolean): Days of this type are taken from the vacation account
  • icon (string): Lucide icon (i-lucide-…)
  • id (string): Id of the absence type
  • paid (boolean): The absence is paid time
  • requiresApproval (boolean): Requests start as requested and need a decision; otherwise they are approved when entered
  • sensitive (boolean): Colleagues see only "abwesend"
  • sortOrder (integer): Position in lists (ascending)
  • timeEffect (string): credit: counts as worked; none: the time account pays (Überstundenabbau); reduce_target: no target (unpaid) (one of credit, none, reduce_target)
  • version (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example 200 answer:

{
  "allowHalfDays": false,
  "archived": false,
  "color": "info",
  "countsAgainstVacation": false,
  "icon": "i-lucide-school",
  "id": "1a3c5e7a-9c1e-4a3c-8e5a-7c9e1a3c5e15",
  "key": "berufsschule",
  "name": "Berufsschule",
  "paid": true,
  "requiresApproval": false,
  "sensitive": false,
  "sortOrder": 80,
  "timeEffect": "credit",
  "version": 1
}

Example request

curl -X PUT 'https://api.mbcom.cloud/api/hr/v1/absence-types/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"allowHalfDays":false,"archived":false,"color":"info","countsAgainstVacation":false,"icon":"i-lucide-school","id":"1a3c5e7a-9c1e-4a3c-8e5a-7c9e1a3c5e15","key":"berufsschule","name":"Berufsschule","paid":true,"requiresApproval":false,"sensitive":false,"sortOrder":80,"timeEffect":"credit","version":1}'

View as Markdown · Interactive reference · OpenAPI