Create/update absences

The POST absence endpoint is used to create or update absences for a user within the system. It validates all business rules related to time periods, approval requirements, and overlapping absences before applying any changes. The operation follows an all-or-nothing approach to ensure data integrity.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Body

Root element

The request body must be an XML document with the root element <Absences>. Each absence is sent as an <Absence> element.

<Absences>
  <Absence>
    ...
  </Absence>
</Absences>

Insert vs. update

  • Insert: Id is empty or omitted. TempId can be provided (insert only).
  • Update: Id contains the existing absence GUID. TempId is ignored.

Body fields

NameTypDescription
Idstringrequired
Defaults to null
Use for update, leave empty for insert
TempIdstringDefaults to null
Insert only, ignored otherwise
CommentstringDefaults to null
A comment
AbsenceTypeIdstringrequired Defaults to null
ID or name of the absence type
UserIdstringrequired Defaults to null
ID or email address
StartDatedaterequired Defaults to null
must be less than or equal to EndDate
EndDatedaterequired Defaults to null
must be less than or equal to EndDate
StartDateMinutesint32Minutes on start date
EndDateMinutesint32Minutes on end date
StatusstringThe following values are allowed: "submitted", "approved", "rejected"

📘

Update restriction: UserId cannot be changed when updating an existing absence.


Examples

Minimal insert

<Absences>
  <Absence>
    <Id></Id>
    <AbsenceTypeId><![CDATA[Urlaub]]></AbsenceTypeId>
    <UserId><![CDATA[[email protected]]]></UserId>
    <StartDate>02.09.2024</StartDate>
    <EndDate>06.09.2024</EndDate>
  </Absence>
</Absences>

Batch insert (multiple absences)

<Absences>
  <Absence>
    <Id></Id>
    <TempId>1</TempId>
    <Comment><![CDATA[Entspannung muss sein]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Urlaub]]></AbsenceTypeId>
    <StartDate>02.09.2024</StartDate>
    <EndDate>06.09.2024</EndDate>
  </Absence>
  <Absence>
    <Id></Id>
    <TempId>2</TempId>
    <Comment><![CDATA[Voll erwischt...]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Krank]]></AbsenceTypeId>
    <StartDate>09.09.2024</StartDate>
    <EndDate>09.09.2024</EndDate>
  </Absence>
  <Absence>
    <Id></Id>
    <TempId>3</TempId>
    <Comment><![CDATA[Und wieder voll erwischt...]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Krank]]></AbsenceTypeId>
    <StartDate>10.09.2024</StartDate>
    <EndDate>10.09.2024</EndDate>
    <Status><![CDATA[approved]]></Status>
  </Absence>
  <Absence>
    <Id></Id>
    <TempId>4</TempId>
    <Comment><![CDATA[Ein besonderer Tag]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Urlaub]]></AbsenceTypeId>
    <StartDate>19.09.2024</StartDate>
    <EndDate>19.09.2024</EndDate>
    <StartDateMinutes>120</StartDateMinutes>
  </Absence>
  <Absence>
    <Id></Id>
    <TempId>5</TempId>
    <Comment><![CDATA[Woche der Einheit]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Urlaub]]></AbsenceTypeId>
    <StartDate>30.09.2024</StartDate>
    <EndDate>04.10.2024</EndDate>
  </Absence>
  <Absence>
    <Id></Id>
    <TempId>6</TempId>
    <Comment><![CDATA[Nikolausi :- )]]></Comment>
    <UserId><![CDATA[[email protected]]]></UserId>
    <AbsenceTypeId><![CDATA[Urlaub]]></AbsenceTypeId>
    <StartDate>02.12.2024</StartDate>
    <EndDate>06.12.2024</EndDate>
    <StartDateMinutes>120</StartDateMinutes>
    <EndDateMinutes>120</EndDateMinutes>
    <Status><![CDATA[approved]]></Status>
  </Absence>
</Absences>

Update example (change date range and comment)

<Absences>
  <Absence>
    <Id>81ac3c34-de32-483f-8085-2fe6dbbec2e9</Id>
    <Comment><![CDATA[Entspannung verschoben]]></Comment>
    <StartDate>11.11.2024</StartDate>
    <EndDate>15.11.2024</EndDate>
  </Absence>
</Absences>

Invalid example (changing the user is not allowed)

<Absences>
  <Absence>
    <Id>81ac3c34-de32-483f-8085-2fe6dbbec2e9</Id>
    <UserId><![CDATA[[email protected]]]></UserId>
  </Absence>
</Absences>

Body Params
string
required
Defaults to null

Test

Responses
401

Unauthorized

403

Forbidden

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!