Skip to content

Absence Confirmations

AttributeDescriptionDetails
absence_idThe ID of the absence.Cannot be set.
actor_idThe ID of the actor (i.e. user) who confirmed the absenceCannot be set.
statusThe status of the absence confirmation entry.Must be either confirmed or rejected

The following relationships can be included in requests:

RelationshipType
actorbelongs_to

Example request:

{
"data": {
"id": "b9996264-9d3d-4658-bd81-fd744679904f",
"type": "absence_confirmation",
"attributes": {
"status": "confirmed"
}
}
}

Example response:

{
"data": {
"id": "a6e9e2f8-5b4e-4a4b-8c7e-6a5b85a3c2b1",
"type": "absence",
"attributes": {
"user_id": "9f8d7c6b-5a4e-3d2c-1b0a-9e8f7d6c5b4a",
"absence_type_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"starts_at": "2025-10-02",
"ends_at": "2025-10-10",
"status": "confirmed",
"confirmations_count": 1
}
}
}

This endpoint creates a new absence_confirmation entry associated with the specified absence.

Once all required confirmations have been submitted, the corresponding absence record is automatically updated with the new status and returned in the response.

Also, if the absence is of absence type having absence quota, absence transactions with type cancel_reserve and charge are created for the user’s absence quota.

POST /api/v1/absences/:absence_id/confirmation

ParameterDescription
absence_idThe ID of the absence to confirm or reject

Example response:

{
"data": {
"id": "a6e9e2f8-5b4e-4a4b-8c7e-6a5b85a3c2b1",
"type": "absence",
"attributes": {
"user_id": "9f8d7c6b-5a4e-3d2c-1b0a-9e8f7d6c5b4a",
"absence_type_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"starts_at": "2025-10-02",
"ends_at": "2025-10-10",
"status": "created",
"confirmations_count": 0
}
}
}

This endpoint withdraws a previously submitted absence_confirmation. If a user has confirmed or rejected an absence, their confirmation entry is discarded and the absence status is recalculated based on the remaining confirmations.

If the absence transitions from confirmed or rejected back to created, and the absence type is linked to a quota type, absence_quota_transactions are created accordingly.

If the absence was previously confirmed and is reset to created:

  • A refund transaction is created to reverse the previously applied charge.
  • A new reserve transaction is created for the absence duration.

If the absence was rejected and is reset to created:

  • A reserve transaction is created.

No quota transactions are created if the absence status does not change.

DELETE /api/v1/absences/:absence_id/confirmation

ParameterDescription
absence_idThe ID of the absence to unconfirm

Example response:

{
"data": [
{
"id": "73236eb5-77e5-4b3e-b494-6aa9269361a3",
"type": "absence_confirmation",
"attributes": {
"absence_id": "11e24703-41e4-410c-8064-7718159445fc",
"actor_id": "62e1761a-b17f-40e4-8eba-6af5675bb623",
"actor_type": "user",
"status": "confirmed"
}
},
{
...
}
]
}

This endpoint returns a list of confirmations for an absence.

GET /api/v1/absences/:absence_id/confirmations

ParameterDescription
absence_idThe ID of the absence from which to return confirmations