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

# updateTimeOffRequest

> The `updateTimeOffRequest` API is used to make changes to all fields in an existing time off request

### Important:

- time off requests cannot be updated after requestStatus is changed to Approved, Denied or Cancelled, instead the request should be deleted and a new timeOffRequest should be submitted
- if the request includes timeOffLineItems, all lineItems must all be re-specified since this overwrites the previous record



## OpenAPI

````yaml put /userPortal/updateTimeOffRequest
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /userPortal/updateTimeOffRequest:
    put:
      tags: []
      summary: updateTimeOffRequest
      description: >-
        The `updateTimeOffRequest` API is used to make changes to all fields in
        an existing time off request


        ### Important:


        - time off requests cannot be updated after requestStatus is changed to
        Approved, Denied or Cancelled, instead the request should be deleted and
        a new timeOffRequest should be submitted

        - if the request includes timeOffLineItems, all lineItems must all be
        re-specified since this overwrites the previous record
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addUserBankAccount
                timeOffRequest:
                  type: object
                  properties:
                    timeOffRequestId:
                      type: string
                    requestHours:
                      type: integer
                    requestStartDate:
                      type: string
                    requestEndDate:
                      type: string
                    timeOffLineItems:
                      type: object
                      properties:
                        date:
                          type: string
                        requesthours:
                          type: integer
                      required:
                        - date
                        - requesthours
                  required:
                    - timeOffRequestId
                    - timeOffLineItems
              required:
                - method
                - timeOffRequest
            example:
              method: updateTimeOffRequest
              timeOffRequest:
                timeOffRequestId: 836DEAC4-9CEA-4D34-B8D5-BFD8CFE8E5A3
                requestStartDate: '2025-10-30'
                requestEndDate: '2025-11-03'
                timeOffLineItems:
                  - date: '2025-10-30'
                    requestHours: 4
                  - date: '2025-11-02'
                    requestHours: 4
                  - date: '2025-11-03'
                    requestHours: 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  timeOffRequest:
                    type: object
                    properties:
                      timeOffRequestId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - timeOffRequestId
                      - status
                      - message
                required:
                  - timeOffRequest
              examples:
                '1':
                  summary: Example 1
                  value:
                    timeOffRequest:
                      timeOffRequestId: 9283E7CA-A503-49E9-A228-E86018A97E8D
                      status: Pending
                      message: Time off request updated successfully
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Invalid timeOffRequestId
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                        message:
                          type: string
                      required:
                        - code
                required:
                  - error
              example:
                error:
                  code: 400
                  message: >-
                    Sum of hours in timeOffLineItems (39) must equal
                    requestHours (12).
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````