ConnectCloud Developers

Request an absence (own, or for anyone with hr:absence:approve)

POST /api/hr/v1/absences

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

Types without approval, and absences an approver enters for someone else, are approved right away. Fails with 409 overlap when another active absence overlaps, 409 period_closed when a closed month is touched and 400 when vacation days are missing.

Request body

application/json (required)

  • endDate (string (date), required): Last day (YYYY-MM-DD), inclusive
  • startDate (string (date), required): First day (YYYY-MM-DD)
  • typeId (string, required): Id of the absence type
  • employeeId (string): Defaults to the caller
  • endHalf (boolean): The last day is only the morning
  • note (string): Note of the employee (max length 2000)
  • startHalf (boolean): The first day is only the afternoon
  • version (integer): Required for PATCH

Example:

{
  "endDate": "2026-12-18",
  "endHalf": false,
  "note": "Städtereise Wien",
  "startDate": "2026-12-14",
  "startHalf": false,
  "typeId": "8c0e2a4c-6e8a-4c0e-9a4c-6e8a0c2e4a13"
}

Responses

  • 201 Created (application/json)
  • 400 Error (application/json)
  • 403 Error (application/json)
  • 409 Error (application/json)

Fields of the 201 answer:

  • createdAt (string (date-time)): When the absence was created
  • createdBy (string): Who entered the absence (e-mail of the caller; the platform team acting in the tenant: „Plattformbetrieb (MBCOM) · “)
  • days (number): Working days (halves allowed)
  • decidedAt (string (date-time)): When it was decided last
  • decidedBy (string): Who decided last (e-mail; the platform team acting in the tenant: „Plattformbetrieb (MBCOM) · “)
  • decisionNote (string): Note of the last decision (e.g. the reason of a rejection)
  • employeeId (string): Id of the employee
  • employeeName (string): Display name of the employee (in lists)
  • endDate (string (date)): Last day (YYYY-MM-DD), inclusive
  • endHalf (boolean): The last day is only the morning
  • id (string): Id of the absence
  • note (string): The employee's note
  • startDate (string (date)): First day (YYYY-MM-DD)
  • startHalf (boolean): The first day is only the afternoon
  • status (string): State of the absence; types without approval start as approved (one of requested, approved, rejected, cancelled, cancellation_requested)
  • typeId (string): Id of the absence type
  • updatedAt (string (date-time)): When the absence was last changed
  • version (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example 201 answer:

{
  "createdAt": "2026-11-16T08:12:00Z",
  "createdBy": "sophie.huber@muster-it.example",
  "days": 5,
  "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
  "employeeName": "Sophie Huber",
  "endDate": "2026-12-18",
  "endHalf": false,
  "id": "3e5a7c9e-1a3c-4e5a-8c7e-9a1c3e5a7c31",
  "note": "Städtereise Wien",
  "startDate": "2026-12-14",
  "startHalf": false,
  "status": "requested",
  "typeId": "8c0e2a4c-6e8a-4c0e-9a4c-6e8a0c2e4a13",
  "updatedAt": "2026-11-16T08:12:00Z",
  "version": 1
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/hr/v1/absences' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"endDate":"2026-12-18","endHalf":false,"note":"Städtereise Wien","startDate":"2026-12-14","startHalf":false,"typeId":"8c0e2a4c-6e8a-4c0e-9a4c-6e8a0c2e4a13"}'

View as Markdown · Interactive reference · OpenAPI