Skip to content

Absence Types

Valid Attributes

AttributeDescriptionDetails
account_idThe ID of the account to which the absence type belongs.Cannot be set
activeWhether an absence type is active or notMust be true or false
nameThe name of the absence typeMust be set

Meta data: Permissions

GroupDescription
actionsContains permissions to edit or delete an absence type

Create

HTTP Request

POST /api/v1/absence_types

Example request:

{
"data": {
"type": "absence_type",
"attributes": {
"name": "Vacation"
}
}
}

Example response:

{
"data": {
"id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a",
"type": "absence_type",
"attributes": {
"active": true,
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Vacation"
}
}
}

This endpoint creates a new absence type for an account.

Update

Example request:

{
"data": {
"type": "absence_type",
"attributes": {
"name": "Updated Absence Type"
}
}
}

Example response:

{
"data": {
"id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a",
"type": "absence_type",
"attributes": {
...
}
}
}

This endpoint updates an absence type.

HTTP Request

PUT /api/v1/absence_types/:absence_type_id

URL Parameters

ParameterDescription
absence_type_idID of the absence type to be updated

List

Example response:

{
"data": [
{
"id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a",
"type": "absence_type",
"attributes": {
"active": true,
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Vacation"
}
},
{
...
}
]
}

This endpoint returns all absence types.

HTTP Request

GET /api/v1/absence_types

Show

Example response:

{
"data": {
"id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a",
"type": "absence_type",
"attributes": {
"active": true,
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Vacation"
}
}
}

This endpoint returns an absence type.

HTTP Request

GET /api/v1/absence_types/:absence_type_id

URL Parameters

ParameterDescription
absence_type_idThe ID of the absence type to return

Delete

Example response:

{
"data": {
"id": "56555aac-4b49-4c75-b6b8-f2d6e8052d57",
"type": "absence_type",
"attributes": {
...
}
}
}

This endpoint deletes an absence type.

HTTP Request

DELETE /api/v1/absence_types/:absence_type_id

URL Parameters

ParameterDescription
absence_type_idID of the absence type to delete