Skip to content

Absence Quota Types

Valid Attributes

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

Create

HTTP Request

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).

Update

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.

HTTP Request

PUT /api/v1/absence_quota_types/:absence_quota_type_id

URL Parameters

ParameterDescription
absence_quota_type_idID of the absence_quota_type to be updated

List

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.

HTTP Request

GET /api/v1/absence_quota_types

Show

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.

HTTP Request

GET /api/v1/absence_quota_types/:absence_quota_type_id

URL Parameters

ParameterDescription
absence_quota_type_idThe ID of the absence quota type to return

Delete

Example response:

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

This endpoint deletes an absence quota type.

HTTP Request

DELETE /api/v1/absence_quota_types/:absence_quota_type_id

URL Parameters

ParameterDescription
absence_quota_type_idID of the absence_quota_type to be deleted