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

# deleteTimeOffRequest

> The `deleteTimeOffRequest` API is used to delete PTO requests before they are approved

### When to use:
- When the employee has changed their mind about a timeOffRequest
- When a timeOffRequest has been created in error

### Note:
- Approved timeOffRequests must be cancelled using `cancelTimeOffrequest`



## OpenAPI

````yaml delete /userPortal/deleteTimeOffRequest
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /userPortal/deleteTimeOffRequest:
    delete:
      tags: []
      summary: deleteTimeOffRequest
      description: >-
        The `deleteTimeOffRequest` API is used to delete PTO requests before
        they are approved


        ### When to use:

        - When the employee has changed their mind about a timeOffRequest

        - When a timeOffRequest has been created in error


        ### Note:

        - Approved timeOffRequests must be cancelled using
        `cancelTimeOffrequest`
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addUserBankAccount
                timeOffRequestId:
                  type: string
              required:
                - method
                - timeOffRequestId
            example:
              method: deleteTimeOffRequest
              timeOffRequestId: A7F26D7A-FAF9-49C6-A623-C14ED3055262
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  timeOffRequest:
                    type: object
                    properties:
                      timeOffRequestId:
                        type: string
                      message:
                        type: string
                    required:
                      - timeOffRequestId
                      - message
                required:
                  - timeOffRequest
              examples:
                '1':
                  summary: Example 1
                  value:
                    timeOffRequest:
                      timeOffRequestId: 31D72E61-60CB-4F2B-A913-ED7EADBEBD98
                      message: Time off request deleted successfully
                '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

````