Skip to content

Absence Quota Types

AttributeDescriptionDetails
account_idThe ID of the account to which the absence quota type belongs.Cannot be set
nameThe name of the absence quota typeMust be set
cycleThe cycle period for absence quota allocationMust be one of: year, quarter, month, week
grant_by_cycleThe number of quota units granted per cycleMust be set, must be an integer

Meta data: Permissions

GroupDescription
actionsContains permissions to edit or delete an absence quota type

POST /api/v1/absence_quota_types

Example request:

{
"data": {
"type": "absence_quota_type",
"attributes": {
"name": "Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
}
}

Example response:

{
"data": {
"id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"type": "absence_quota_type",
"attributes": {
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
}
}

This endpoint creates a new absence quota type for an account. Absence quota types define how many days or hours are granted to employees on a recurring cycle basis (yearly, quarterly, monthly, or weekly).

Example request:

{
"data": {
"type": "absence_quota_type",
"attributes": {
"name": "Updated Annual Vacation Fulltime Employee"
}
}
}

Example response:

{
"data": {
"id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"type": "absence_quota_type",
"attributes": {
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Updated Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
}
}

This endpoint updates an absence quota type.

PUT /api/v1/absence_quota_types/:absence_quota_type_id

ParameterDescription
absence_quota_type_idID of the absence_quota_type to be updated

An absence quota type cannot be updated if it is referenced by at least one absence type.

Example response:

{
"data": [
{
"id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"type": "absence_quota_type",
"attributes": {
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
},
{
...
}
]
}

This endpoint returns all absence quota types.

GET /api/v1/absence_quota_types

Example response:

{
"data": [
{
"id": "6a1687a2-dee1-4e67-a68d-505d36683cd8",
"type": "absence_quota_type",
"attributes": {
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
},
{
...
}
]
}

This endpoint returns all absence quota types that the specified user is allowed to use.

GET /api/v1/users/:user_id/absence_quota_types

ParameterDescription
user_idID of the user whose available absence quota types should be listed

Example response:

{
"data": {
"id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"type": "absence_quota_type",
"attributes": {
"account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f",
"name": "Annual Vacation Fulltime Employee",
"cycle": "year",
"grant_by_cycle": 25
}
}
}

This endpoint returns an absence quota type.

GET /api/v1/absence_quota_types/:absence_quota_type_id

ParameterDescription
absence_quota_type_idThe ID of the absence quota type to return

Example response:

{
"data": {
"id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"type": "absence_quota_type",
"attributes": {
...
}
}
}

This endpoint deletes an absence quota type.

DELETE /api/v1/absence_quota_types/:absence_quota_type_id

ParameterDescription
absence_quota_type_idID of the absence_quota_type to be deleted