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

# cancelTimeOffRequest

> The `cancelTimeOffRequest` API is used to cancel Approved PTO requests

### Notes:
- When an employee's PTO is cancelled their hours are re-added to available PTO balances
- Cancellations can be initiated by employees and businessUsers
- Cancellations can occur during time off. If this is the case only the hours consumed **so far** are deducted from the user's balance



## OpenAPI

````yaml post /userPortal/cancelTimeOffRequest
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /userPortal/cancelTimeOffRequest:
    post:
      tags: []
      summary: cancelTimeOffRequest
      description: >-
        The `cancelTimeOffRequest` API is used to cancel Approved PTO requests


        ### Notes:

        - When an employee's PTO is cancelled their hours are re-added to
        available PTO balances

        - Cancellations can be initiated by employees and businessUsers

        - Cancellations can occur during time off. If this is the case only the
        hours consumed **so far** are deducted from the user's balance
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addUserBankAccount
                timeOffRequestId:
                  type: string
              required:
                - method
                - timeOffRequestId
            example:
              method: cancelTimeOffRequest
              timeOffRequestId: A7F26D7A-FAF9-49C6-A623-C14ED3055262
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  timeOffRequest:
                    type: object
                    properties:
                      timeOffRequestId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      hoursConsumed:
                        type: number
                      hoursRestored:
                        type: string
                    required:
                      - timeOffRequestId
                      - status
                      - message
                      - hoursConsumed
                      - hoursRestored
                required:
                  - timeOffRequest
              examples:
                '1':
                  summary: Example 1
                  value:
                    timeOffRequest:
                      timeOffRequestId: A7F26D7A-FAF9-49C6-A623-C14ED3055262
                      status: Cancelled
                      message: Time off request cancelled successfully
                      hoursConsumed: 0
                      hoursRestored: 0
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: 'Invalid timeOffRequestId: Time off request not found.'
          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: 'Invalid timeOffRequestId: Time-off request not found.'
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````