> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pland.app/llms.txt
> Use this file to discover all available pages before exploring further.

# List Absences

> List all absences in the system with optional filtering, pagination, and sorting capabilities. Supports filtering by status, dates, users, pay types, and more.



## OpenAPI

````yaml GET /absences/
openapi: 3.0.0
info:
  title: PlanD API
  description: PlanD Public API
  version: '2'
servers:
  - url: http:localhost:3000/v2
    description: Local Server
  - url: https://beta-api.pland.app/v2
    description: Sandbox Server
  - url: https://cloud-api.pland.app/v2
    description: Production Server
security: []
tags:
  - name: Absences
    description: >-
      Absence management endpoints for creating, updating, and managing user
      absences
  - name: Activity Types
    description: Activity type management operations
  - name: API Keys
    description: API key management operations for programmatic access to the API
  - name: Assignments
    description: Assignment management operations
  - name: Chat (Legacy)
    description: >-
      Legacy chat operations using Stream Chat service (deprecated - use Entity
      Chat v2 instead)
  - name: Client
    description: Unauthenticated client-facing operations
  - name: Company
    description: Company information and settings management operations
  - name: Complaints
    description: Customer complaint and ticket management operations
  - name: Contacts
    description: Contact person management operations
  - name: Customers
    description: Customer management operations
  - name: Customer Objects
    description: >-
      Customer object management operations - locations and buildings where
      services are performed
  - name: Documents
    description: >-
      Document management operations for uploading, retrieving, and managing
      files
  - name: Logbuch
    description: >-
      Operations for sending, retrieving, updating, and deleting Logbuch in
      entity chats.
  - name: Push Notifications
    description: Operations for listing, reading, and deleting user notifications.
  - name: Equipment
    description: Equipment management operations
  - name: Equipment Types
    description: Equipment type management operations
  - name: Assignment Confirmations
    description: Assignment confirmation management operations
  - name: Credit
    description: >-
      Credit note management operations for creating and handling credit
      documents
  - name: Invoice
    description: >-
      Invoice management operations for creating, managing, and processing
      customer invoices
  - name: Invoice Reminders
    description: >-
      Invoice reminder management operations for creating and handling payment
      reminder documents
  - name: Invoice Reminder Templates
    description: >-
      Invoice reminder template management operations for creating and handling
      reminder document templates
  - name: Invoice Storno
    description: Invoice storno (cancellation) document management operations
  - name: Invoice Templates
    description: >-
      Invoice template management operations for creating and handling invoice
      document templates
  - name: Offers
    description: Offer management operations
  - name: ServiceReport
    description: >-
      Service report management operations for creating and handling service
      documentation
  - name: Holiday
    description: Holidays management
  - name: Implementation
    description: User implementation progress tracking and onboarding management
  - name: Jobs
    description: >-
      Endpoints for managing jobs, including creation, listing, updating, and
      job-specific actions.
  - name: Material Orders
    description: Operations for listing, viewing, updating, and managing material orders.
  - name: Notifications
    description: User notification management operations
  - name: Payment Methods
    description: >-
      Payment method management operations for configuring available payment
      options
  - name: Payment Terms
    description: Operations for managing payment terms
  - name: Payments
    description: Payment management operations
  - name: Articles
    description: >-
      Operations for creating, listing, viewing, updating, and deleting
      articles.
  - name: Suppliers
    description: Supplier management operations
  - name: Service Products
    description: >-
      Operations for creating, listing, viewing, updating, and deleting service
      products.
  - name: Quality Control
    description: Quality control and assessment management operations
  - name: Pay Types
    description: Pay type management operations for salary and absence types
  - name: Salary
    description: >-
      Salary management operations for tracking and managing employee
      compensation
  - name: Surcharges
    description: Surcharge management operations for pay types and salary calculations
  - name: Search
    description: Search for entities in PlanD
  - name: Signing
    description: Endpoints for creating and listing signings (digital signatures).
  - name: Tasks
    description: Task management operations
  - name: Task Types
    description: Task type management operations
  - name: Tax Rates
    description: >-
      Tax rate management operations for handling VAT, zero rates, exemptions,
      and reverse charge scenarios
  - name: Time Tracking
    description: >-
      Time tracking management endpoints for recording, monitoring, and managing
      work time entries
  - name: Assets
    description: Asset URL management operations for secure access to uploaded files
  - name: Upload
    description: >-
      CSV and file uploads for various entities (articles, material, users,
      customers, objects, contacts, equipment, images)
  - name: Users
    description: >-
      User management endpoints for creating, updating, and managing system
      users
  - name: Authentication
    description: User authentication and password management operations
  - name: Banking Transactions
    description: Banking transaction management operations
  - name: Webhooks
  - name: SMS
    description: Endpoints for SMS status updates and link tracking.
paths:
  /absences/:
    get:
      tags:
        - Absences
      summary: List absences
      description: >-
        List all absences in the system with optional filtering, pagination, and
        sorting capabilities. Supports filtering by status, dates, users, pay
        types, and more.
      operationId: listAbsences
      parameters:
        - name: limit
          in: query
          description: Maximum number of absences to return
          required: false
          schema:
            type: integer
            default: 100
            maximum: 1000
            minimum: 1
        - name: offset
          in: query
          description: Number of absences to skip for pagination
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: sort
          in: query
          description: Sort field and direction (e.g. dtStart:1, status.createdAt:-1)
          required: false
          schema:
            type: string
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterStatus'
        - name: ids
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterIds'
        - name: user
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterUser'
        - name: userIds
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterUserIds'
        - name: objectManagers
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterObjectManagers'
        - name: notFinished
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterNotFinished'
        - name: assigned
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterAssigned'
        - name: object
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterObject'
        - name: end
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterEnd'
        - name: dtEndFrom
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterDTEndFrom'
        - name: dtEndTo
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterDTEndTo'
        - name: dtStartTo
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterDTStartTo'
        - name: absencePayType
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterAbsencePayType'
        - name: userIdsByName
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterUserIdsByName'
        - name: absenceType
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterAbsenceType'
        - name: affectedObjectIds
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterAffectedObjectIds'
        - name: employmentUserIds
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterEmploymentUserIds'
        - name: userIdsByTag
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FilterUserIdsByTag'
        - name: generalField
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/GeneralFieldFilter'
      responses:
        '200':
          description: List of absences
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Absence'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Error retrieving absences
      security:
        - API-Key: []
        - Bearer-Auth: []
components:
  schemas:
    FilterStatus:
      description: Filter by status (single value or comma-separated list)
      type: string
      x-internal: true
    FilterIds:
      description: Filter by IDs (array of objectIds)
      type: array
      items:
        type: string
        format: objectid
      x-internal: true
    FilterUser:
      description: Filter by user ID
      type: string
      format: objectid
      x-internal: true
    FilterUserIds:
      title: Filter for User IDs
      description: >-
        Filter to search jobs by user IDs. If the user ID is "unassigned_jobs",
        it will search for jobs without a user ID.
      type: array
      items:
        description: >-
          User ID to filter jobs by. If "unassigned_jobs" is included, it will
          also search for jobs without a user ID.
        type: string
        format: objectId
      x-internal: true
    FilterObjectManagers:
      description: Filter by Object Manager IDs
      type: array
      items:
        type: string
        format: objectid
      x-internal: true
    FilterNotFinished:
      description: Filter for not finished tasks
      x-internal: true
    FilterAssigned:
      description: Filter either assigned ("true") or unassigned ("false") absences
      x-internal: true
    FilterObject:
      description: Filter by object ID
      type: string
      format: objectid
      x-internal: true
    FilterEnd:
      description: Filter entities with dtEnd > value (timestamp)
      type: integer
      format: int64
      x-internal: true
    FilterDTEndFrom:
      description: Filter by end date from (timestamp)
      type: integer
      format: int64
      x-internal: true
    FilterDTEndTo:
      description: Filter by end date to (timestamp)
      type: integer
      format: int64
      x-internal: true
    FilterDTStartTo:
      description: Filter by start date to (timestamp)
      type: integer
      format: int64
      x-internal: true
    FilterAbsencePayType:
      description: Filter absences by pay type absence IDs
      type: array
      items:
        type: string
        format: objectid
      x-internal: true
    FilterUserIdsByName:
      description: Filter something (e.g. complaints) by the assigned user's name or number
      properties:
        value:
          description: The name or number of the user to filter by
          type: string
      type: object
    FilterAbsenceType:
      description: Filter absences by type (open, approved, declined, assigned)
      type: string
      enum:
        - open
        - approved
        - declined
        - assigned
      x-internal: true
    FilterAffectedObjectIds:
      description: Filter by affected object IDs
      type: array
      items:
        type: string
        format: objectid
      x-internal: true
    FilterEmploymentUserIds:
      description: Filter by employment user IDs
      type: array
      items:
        type: string
      x-internal: true
    FilterUserIdsByTag:
      description: >-
        Filter by user tags - finds users with specified tags and filters by
        their IDs
      type: array
      items:
        type: string
      x-internal: true
    GeneralFieldFilter:
      description: >-
        A dynamic filter that allows filtering on any field with various
        operators. Supports string, number, boolean, date, and objectid field
        types.
      required:
        - key
        - value
        - operator
        - fieldType
      properties:
        key:
          description: >-
            The field path to filter on (supports dot notation for nested
            fields)
          type: string
          example: customer.name
        value:
          description: The value to filter by
          example: Example Company
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items:
                type: string
        operator:
          description: The comparison operator to use
          type: string
          enum:
            - contains
            - equals
            - not_equals
            - greater_than
            - less_than
            - greater_equal
            - less_equal
            - in
            - not_in
            - exists
            - not_exists
            - regex
          example: contains
        fieldType:
          description: The data type of the field being filtered
          type: string
          enum:
            - string
            - number
            - boolean
            - date
            - objectid
          example: string
      type: object
      x-internal: true
    Absence:
      title: Absence
      description: Absence record for a user, including type, dates, and affected jobs.
      type: object
      allOf:
        - $ref: '#/components/schemas/ChatableEntityModel'
        - properties:
            _id:
              description: Unique identifier for the absence
              type: string
              format: objectid
            userId:
              description: User ID for whom the absence is recorded
              type: string
              format: objectid
            type:
              description: Absence type (e.g., illness, vacation, unpaid leave)
              type: integer
            payTypeAbsenceId:
              description: Pay type absence ID
              type: string
              format: objectid
              nullable: true
            calculationType:
              description: Calculation type for the absence
              type: string
              nullable: true
            desc:
              description: Description or comment for the absence
              type: string
              nullable: true
            dtStart:
              description: Start date/time of the absence
              type: string
              format: date-time
            dtEnd:
              description: End date/time of the absence
              type: string
              format: date-time
            daysAbsent:
              description: Number of days absent
              type: number
              format: float
            fullDay:
              description: Whether the absence is for a full day
              type: boolean
            approvedBy:
              description: User ID who approved the absence
              type: string
              format: objectid
              nullable: true
            declinedBy:
              description: User ID who declined the absence
              type: string
              format: objectid
              nullable: true
            affectedJobs:
              description: List of job IDs affected by this absence
              type: array
              items:
                type: string
                format: objectid
            isAssigned:
              description: Whether all replacement jobs are assigned
              type: boolean
            attachments:
              description: Attachment IDs or file references
              type: array
              items:
                type: string
            imageIds:
              description: Image IDs associated with the absence
              type: array
              items:
                type: string
            objectManagerIds:
              description: IDs of object managers
              type: array
              items:
                type: string
                format: objectid
            declineComment:
              description: Comment for declined absence
              type: string
              nullable: true
            sendEmailToCustomer:
              description: Whether to send an email to the customer
              type: boolean
            affectedObjectIds:
              description: IDs of affected objects
              type: array
              items:
                type: string
                format: objectid
            absencePaidTimeArray:
              description: Paid time for each day of the absence
              type: array
              items:
                type: object
            replacements:
              description: Replacement assignments for the absence
              type: array
              items:
                type: object
            status:
              description: Status struct for the absence
              type: object
          type: object
    ChatableEntityModel:
      title: Chatable Entity Model
      description: Base class for all entities that can have a chat associated with them.
      type: object
      allOf:
        - $ref: '#/components/schemas/Entity'
        - properties:
            chatId:
              description: ID of the chat associated with this entity
              type: string
              format: objectid
              nullable: true
          type: object
    Entity:
      title: Entity
      description: >-
        Base class for all entities in the system, providing common properties
        and methods.
      properties:
        _id:
          description: Unique identifier of the entity
          type: string
          format: objectid
        number:
          description: Unique number of the entity, used for identification
          type: integer
        companyId:
          description: The ID of the company this entity belongs to
          type: string
          format: objectid
          x-internal: true
        status:
          $ref: '#/components/schemas/StatusStruct'
      type: object
    StatusStruct:
      description: Entity Status information
      properties:
        status:
          description: Current status
          type: integer
        createdAt:
          description: Creation timestamp
          type: string
          format: date-time
        createdBy:
          description: User who created this supplier
          type: string
          format: objectid
        lastModifiedAt:
          description: Last modification timestamp
          type: string
          format: date-time
        lastModifiedBy:
          description: User who last modified this supplier
          type: string
          format: objectid
      type: object
  securitySchemes:
    API-Key:
      type: apiKey
      name: x-API-Key
      in: header
    Bearer-Auth:
      type: http
      bearerFormat: JWT
      scheme: bearer

````