GET
/
absences
/
List absences
curl --request GET \
  --url http:localhost:3000/v2/absences/ \
  --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)

user
string<objectid>

Filter by user ID

userIds
string<objectId>[]

Filter to search jobs by user IDs. If the user ID is "unassigned_jobs", it will search for jobs without a user ID.

User ID to filter jobs by. If "unassigned_jobs" is included, it will also search for jobs without a user ID.

objectManagers
string<objectid>[]

Filter by Object Manager IDs

notFinished
any

Filter for not finished tasks

assigned
any

Filter either assigned ("true") or unassigned ("false") absences

object
string<objectid>

Filter by object ID

end
integer

Filter entities with dtEnd > value (timestamp)

dtEndFrom
integer

Filter by end date from (timestamp)

dtEndTo
integer

Filter by end date to (timestamp)

dtStartTo
integer

Filter by start date to (timestamp)

absencePayType
string<objectid>[]

Filter absences by pay type absence IDs

userIdsByName
object

Filter something (e.g. complaints) by the assigned user's name or number

absenceType
enum<string>

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

Available options:
open,
approved,
declined,
assigned
affectedObjectIds
string<objectid>[]

Filter by affected object IDs

employmentUserIds
string[]

Filter by employment user IDs

userIdsByTag
string[]

Filter by user tags - finds users with specified tags and filters by their IDs

generalField
object

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

Response

200
application/json

List of absences

The response is of type Absence · object[].