Skip to main content
GET
/
absences
/
self
List personal absences
curl --request GET \
  --url http:localhost:3000/v2/absences/self \
  --header 'x-API-Key: <api-key>'
[
  {
    "_id": "<string>",
    "number": 123,
    "companyId": "<string>",
    "status": {
      "status": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "lastModifiedAt": "2023-11-07T05:31:56Z",
      "lastModifiedBy": "<string>"
    },
    "chatId": "<string>",
    "userId": "<string>",
    "type": 123,
    "payTypeAbsenceId": "<string>",
    "calculationType": "<string>",
    "desc": "<string>",
    "dtStart": "2023-11-07T05:31:56Z",
    "dtEnd": "2023-11-07T05:31:56Z",
    "daysAbsent": 123,
    "fullDay": true,
    "approvedBy": "<string>",
    "declinedBy": "<string>",
    "affectedJobs": [
      "<string>"
    ],
    "isAssigned": true,
    "attachments": [
      "<string>"
    ],
    "imageIds": [
      "<string>"
    ],
    "objectManagerIds": [
      "<string>"
    ],
    "declineComment": "<string>",
    "sendEmailToCustomer": true,
    "affectedObjectIds": [
      "<string>"
    ],
    "absencePaidTimeArray": [
      {}
    ],
    "replacements": [
      {}
    ]
  }
]

Authorizations

x-API-Key
string
header
required

Query Parameters

limit
integer
default:100

Maximum number of absences to return

Required range: 1 <= x <= 1000
offset
integer
default:0

Number of absences to skip for pagination

Required range: x >= 0
sort
string

Sort field and direction (e.g. dtStart:1, status.createdAt:-1)

status
string

Filter by status (single value or comma-separated list)

ids
string<objectid>[]

Filter by IDs (array of objectIds)

absencePayType
string<objectid>[]

Filter absences by pay type absence IDs

absenceType
enum<string>

Filter absences by type (open, approved, declined, assigned)

Available options:
open,
approved,
declined,
assigned
dtEndFrom
integer

Filter by end date from (timestamp)

dtEndTo
integer

Filter by end date to (timestamp)

dtStartTo
integer

Filter by start date to (timestamp)

generalField
object

A dynamic filter that allows filtering on any field with various operators. Supports string, number, boolean, date, and objectid field types.

Response

List of personal absences

_id
string<objectid>

Unique identifier for the absence Unique identifier of the entity

userId
string<objectid>

User ID for whom the absence is recorded

type
integer

Absence type (e.g., illness, vacation, unpaid leave)

payTypeAbsenceId
string<objectid> | null

Pay type absence ID

calculationType
string | null

Calculation type for the absence

desc
string | null

Description or comment for the absence

dtStart
string<date-time>

Start date/time of the absence

dtEnd
string<date-time>

End date/time of the absence

daysAbsent
number

Number of days absent

fullDay
boolean

Whether the absence is for a full day

approvedBy
string<objectid> | null

User ID who approved the absence

declinedBy
string<objectid> | null

User ID who declined the absence

affectedJobs
string<objectid>[]

List of job IDs affected by this absence

isAssigned
boolean

Whether all replacement jobs are assigned

attachments
string[]

Attachment IDs or file references

imageIds
string[]

Image IDs associated with the absence

objectManagerIds
string<objectid>[]

IDs of object managers

declineComment
string | null

Comment for declined absence

sendEmailToCustomer
boolean

Whether to send an email to the customer

affectedObjectIds
string<objectid>[]

IDs of affected objects

absencePaidTimeArray
object[]

Paid time for each day of the absence

replacements
object[]

Replacement assignments for the absence

status
object

Status struct for the absence Entity Status information

number
integer

Unique number of the entity, used for identification

companyId
string<objectid>

The ID of the company this entity belongs to

chatId
string<objectid> | null

ID of the chat associated with this entity