Skip to main content
POST
Create new absence

Authorizations

x-API-Key
string
header
required

Body

application/json

Absence data

Absence record for a user, including type, dates, and affected jobs.

_id
string<objectid>

Unique identifier for the absence

number
integer

Unique number of the entity, used for identification

companyId
string<objectid>

The ID of the company this entity belongs to

status
object

Status struct for the absence

chatId
string<objectid> | null

ID of the chat associated with this 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<float>

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

Response

Absence created successfully

absenceId
string<objectid>

ID of the created absence