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

# updateTimeOffPolicy

> The `updateTimeOffPolicy` API is used to make changes to all elements of a company-wide time off policy

Notes:
- Time off policies can be retrieved for a company using `getTimeOffPolicies`



## OpenAPI

````yaml put /adminPortal/updateTimeOffPolicy
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/updateTimeOffPolicy:
    put:
      tags: []
      summary: updateTimeOffPolicy
      description: >-
        The `updateTimeOffPolicy` API is used to make changes to all elements of
        a company-wide time off policy


        Notes:

        - Time off policies can be retrieved for a company using
        `getTimeOffPolicies`
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addCompanyBankAccount
                timeOffPolicy:
                  type: object
                  properties:
                    timeOffPolicyId:
                      type: string
                    timeOffPolicyType:
                      type: string
                    timeOffPolicyName:
                      type: string
                    earningMethod:
                      type: string
                      enum:
                        - Lump Sum (All at once)
                        - Accrual (Earned over time)
                    lumpSumHoursEarned:
                      type: integer
                    accrualRatePerHour:
                      type: number
                    canCarryoverHours:
                      type: boolean
                    carryoverLimitHours:
                      type: integer
                    maxAccumulatedHours:
                      type: integer
                    carryoverDate:
                      type: string
                    waitingPeriodUnit:
                      type: string
                      enum:
                        - Days
                        - Weeks
                        - Months
                    waitingPeriodQuantity:
                      type: integer
                    isProratedByStartDate:
                      type: boolean
                    timeOffReceivedWhen:
                      type: string
                      enum:
                        - On Hire Date
                        - After First Payroll
                        - Start of Year
                    payoutOnTerminations:
                      type: boolean
                    maxPayoutHours:
                      type: integer
                    effectiveStartDate:
                      type: string
                    effectiveEndDate:
                      type: string
                  required:
                    - timeOffPolicyId
              required:
                - method
                - timeOffPolicy
            example:
              method: updateTimeOffPolicy
              timeOffPolicy:
                companyId: 60649290-6473-45B7-9561-E3E9756FD700
                timeOffPolicyType: Personal Days
                timeOffPolicyName: PTO Full Time
                earningMethod: Lump Sum (All at once)
                lumpSumHoursEarned: 80
                accrualRatePerHour: 1.5
                canCarryoverHours: true
                carryoverLimitHours: 40
                maxAccumulatedHours: 160
                carryoverDate: '2024-06-02'
                waitingPeriodUnit: Weeks
                waitingPeriodQuantity: 30
                isProratedByStartDate: true
                timeOffReceivedWhen: Start of Year
                payoutOnTerminations: true
                maxPayoutHours: 40
                effectiveStartDate: '2024-01-01'
                effectiveEndDate: '2026-01-01'
                isActive: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeOffPolicy:
                    type: object
                    properties:
                      timeOffPolicyId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - status
                      - message
                      - timeOffPolicyId
                required:
                  - timeOffPolicy
              examples:
                '1':
                  summary: Success
                  value:
                    timeOffPolicy:
                      timeOffPolicyId: 60649290-6473-45B7-9561-E3E9756FD700
                      status: inactive
                      message: Time off policy updated successfully
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Invalid timeOffPolicyId
          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 earningMethod: Bonus.'
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````