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

# addTimeOffPolicyAssignment

> The `addTimeOffPolicyAssignment` API adds an employee to an existing company Time Off Policy

### Notes:
- Active time off policy assignments for a company and employees can be retrieved using the `getTimeOffPolicyAssignments` API
- Employees must be active within a timeOffPolicy before they can accrue or request PTO



## OpenAPI

````yaml post /adminPortal/addTimeOffPolicyAssignment
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/addTimeOffPolicyAssignment:
    post:
      tags: []
      summary: addTimeOffPolicyAssignment
      description: >-
        The `addTimeOffPolicyAssignment` API adds an employee to an existing
        company Time Off Policy


        ### Notes:

        - Active time off policy assignments for a company and employees can be
        retrieved using the `getTimeOffPolicyAssignments` API

        - Employees must be active within a timeOffPolicy before they can accrue
        or request PTO
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addCompanyBankAccount
                timeOffPolicyAssignment:
                  type: object
                  properties:
                    employeeId:
                      type: string
                    companyId:
                      type: string
                    timeOffPolicyId:
                      type: string
                    effectiveStartDate:
                      type: string
                    effectiveEndDate:
                      type: string
                  required:
                    - employeeId
                    - companyId
                    - timeOffPolicyId
                    - effectiveStartDate
                    - effectiveEndDate
              required:
                - method
                - timeOffPolicyAssignment
            example:
              method: addTimeOffPolicyAssignment
              timeOffPolicyAssignment:
                employeeId: 1755E872-9092-4ECE-8386-860531D492D3
                companyId: 21DA3F1A-E593-42EE-95F5-A22EDF6382F0
                timeOffPolicyId: 1BD5AB2B-AEEC-46CD-A93B-D1A68FB90C3A
                effectiveStartDate: '2025-10-01'
                effectiveEndDate: '2026-11-01'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeOffPolicyAssignment:
                    type: object
                    properties:
                      timeOffPolicyAssignmentId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - timeOffPolicyAssignmentId
                      - message
                      - status
                required:
                  - timeOffPolicyAssignment
              examples:
                '1':
                  summary: Success
                  value:
                    timeOffPolicyAssignment:
                      timeOffPolicyAssignmentId: 339221E0-D1A7-4E8B-AE79-FF08B847CD68
                      status: active
                      message: Time off policy assignment successfully created
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Invalid CompanyId
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                required:
                  - error
              example:
                error:
                  code: 400
                  message: >-
                    Employee already has an assignment for this time off policy.
                    Use AdminPortal.updateTimeOffPolicyAssignment to modify the
                    existing assignment.
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````