Retrieve an absence definition

Retrieve an absence definition

Introduction

You can retrieve an absence definition by the internal ID or an external reference using the GET call. Internal IDs for absence definitions can be found by listing all absence definitions using the GET collection endpoint.

Tip

Check the Swagger page for more technical information on the endpoints.

Endpoint details

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/absence-definitions/{absenceDefinitionReference}

URL parameters

This parameter needs to be filled in when calling this endpoint.

Parameter Description
<absenceDefinitionReference> The internal ID or external reference of the absence definition.

Response properties

This list of properties is returned by this endpoint.

Property Type Description
changeVersion string Property to indicate the order of changes.
id integer Internal unique identifier for the absence definition.
name.default string Default name value of the absence definition.
name.translations string A list of translated names of the definition by language code.
code string An absence code used for this definition.
friendlyName.default string Default friendly name value for this definition shown to users.
friendlyName.translations string A list of translated friendly names by language code.
friendlyCode.default string Default friendly code value for this definition shown to users.
friendlyCode.translations string A list of translated friendly codes by language code.
allowedDurations array List of allowed durations (Unknown, FullDay, HalfDay, Interval, Duration).
isEnabled boolean Indicates if the absence definition is enabled in myProtime.
isReasonForClocking boolean Indicates if this absence can be used as a reason for clockings.
absenceGroup.id integer The ID of the associated absence group.

External references

It’s possible to use predefined external references and custom external references. More information can be found on the External References Page

For a list of predefined external references, see the external reference options section.

Note

Check the query options below the endpoint on the Swagger page for the relevant external references.

Caution

There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.

Examples

Retrieving an absence definition by internal ID

Example with internal ID 9:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/absence-definitions/9

Retrieving an absence definition by external reference

Example with absence code O200:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/absence-definitions/O200?externalReferences=(absence-definitions,@absence-code)

With custom external reference

Example with custom external reference 123:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/absence-definitions/123?externalReferences=(absence-definitions,customAbsenceCode)