Skip to content

Absence Quota Types

Attribute Description Details
account_id The ID of the account to which the absence quota type belongs. Cannot be set
name The name of the absence quota type Must be set
cycle The cycle period for absence quota allocation Must be one of: year, quarter, month, week
grant_by_cycle The number of quota units granted per cycle Must be set, must be an integer

Meta data: Permissions

Group Description
actions Contains 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

Parameter Description
absence_quota_type_id ID 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

Parameter Description
user_id ID 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

Parameter Description
absence_quota_type_id The 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

Parameter Description
absence_quota_type_id ID of the absence_quota_type to be deleted