> ## 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.

# updateTimeOffPolicyAssignment

> The `updateTimeOffPolicyAssignment` API updates an employee's time off policy assignment

### Note:
- Active time off policy assignments for a company and employees can be retrieved using the `getTimeOffPolicyAssignments` API
- isActive flag can be used to remove an employee from a PTO policy if they become ineligible or switch to a different policy



## OpenAPI

````yaml put /adminPortal/updateTimeOffPolicyAssignment
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/updateTimeOffPolicyAssignment:
    put:
      tags: []
      summary: updateTimeOffPolicyAssignment
      description: >-
        The `updateTimeOffPolicyAssignment` API updates an employee's time off
        policy assignment


        ### Note:

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

        - isActive flag can be used to remove an employee from a PTO policy if
        they become ineligible or switch to a different policy
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addCompanyBankAccount
                timeOffPolicyAssignment:
                  type: object
                  properties:
                    timeOffPolicyAssignmentId:
                      type: string
                    effectiveStartDate:
                      type: string
                    effectiveEndDate:
                      type: string
                    isActive:
                      type: boolean
                  required:
                    - timeOffPolicyAssignmentId
              required:
                - method
                - timeOffPolicyAssignment
            example:
              method: updateTimeOffPolicyAssignment
              timeOffPolicyAssignment:
                timeOffPolicyAssignmentId: 339221E0-D1A7-4E8B-AE79-FF08B847CD68
                effectiveStartDate: '2025-01-01'
                effectiveEndDate: '2026-01-01'
                isActive: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeOffPolicyAssignment:
                    type: object
                    properties:
                      timeOffPolicyAssignmentId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - status
                      - message
                      - timeOffPolicyAssignmentId
                required:
                  - timeOffPolicyAssignment
              examples:
                '1':
                  summary: Success
                  value:
                    timeOffPolicyAssignment:
                      timeOffPolicyAssignmentId: 339221E0-D1A7-4E8B-AE79-FF08B847CD68
                      status: inactive
                      message: Time off policy assignment updated successfully
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: effectiveEndDate cannot be before effectiveStartDate.
          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: Invalid timeOffPolicyAssignmentId
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````