curl --request POST \
--url http:localhost:3000/v2/absences/ \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '{
"_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": [
{}
]
}'
{
"absenceId": "<string>"
}
Create a new absence record for a user. Requires dtStart and dtEnd dates. If no userId is provided, creates absence for the authenticated user.
curl --request POST \
--url http:localhost:3000/v2/absences/ \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '{
"_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": [
{}
]
}'
{
"absenceId": "<string>"
}
Absence data
Absence record for a user, including type, dates, and affected jobs. Base class for all entities that can have a chat associated with them. Base class for all entities in the system, providing common properties and methods.
Absence created successfully
The response is of type object
.
Was this page helpful?