Skip to content

User Absence Quotas

Valid Attributes

AttributeDescriptionDetails
user_idThe ID of the user to which the absence quota belongs to.
absence_quota_type_idThe ID of the absence quota type to which the absence quota belongs to.
cycle_startThe cycle start date of the absence quota.
cycle_endThe cycle end date of the absence quota.

Relationships

RelationshipDescription
userThe user associated with this absence quota
absence_quota_transactionsThe absence quota transactions associated with this absence quota

Create

Example request:

{
"data": {
"type": "absence_quota",
"attributes": {
"absence_quota_type_id": "a6cdcc7c-3873-4a7a-a1cd-e0a2f6169304",
"cycle_start": "2025-01-01",
"cycle_end": "2025-31-01"
}
}
}

Example response:

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "absence_quota",
"attributes": {
"user_id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"absence_quota_type_id": "a6cdcc7c-3873-4a7a-a1cd-e0a2f6169304",
"cycle_start": "2025-01-01",
"cycle_end": "2025-31-01"
}
}
}

This endpoint creates an absence quota for a user, as well as an associated absence quota transaction of type grant.

HTTP Request

POST /api/v1/users/:user_id/absence_quotas

URL Parameters

ParameterDescription
user_idID of the user to whom the absence quota is attached

List

Example response:

{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "absence_quota",
"attributes": {
"user_id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2a",
"absence_quota_type_id": "a6cdcc7c-3873-4a7a-a1cd-e0a2f6169304",
"cycle_start": "2025-01-01",
"cycle_end": "2025-31-01"
}
},
{
...
}
]
}

This endpoint returns absence quotas for a user.

HTTP Request

GET /api/v1/users/:user_id/absence_quotas

ParameterDescription
user_idID of the user to whom the absence quota is attached