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

# terminateUser

> 
The `terminateUser` API permanently terminates an employee or contractor. The termination is permanent and users cannot be reactivated, but employee data is retained for compliance reasons.

### What it does:

- Sets exit date, final paycheck details and termination reason
- Option to add a severance package 
- Allows more complex severance packets to be applied to termination, including 
- Includes additional notes 

### Options

#### terminationChoice

- Yes - This employee is leaving voluntarily
- No - This user did not choose to leave

#### Final Payment Details

- They will be paid by cash or check
- They will be paid by supplemental payroll
- They will be paid by a different way
- They will be paid during a regular payroll cycle
- They have already been paid

### Notes:

- Different from `deactivateUser` - terminated users cannot be reactivated
- Includes severance payment options including payment over time and lump sum, and dismissal type tracking



## OpenAPI

````yaml put /adminPortal/terminateUser
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/terminateUser:
    put:
      tags: []
      summary: terminateUser
      description: >-

        The `terminateUser` API permanently terminates an employee or
        contractor. The termination is permanent and users cannot be
        reactivated, but employee data is retained for compliance reasons.


        ### What it does:


        - Sets exit date, final paycheck details and termination reason

        - Option to add a severance package 

        - Allows more complex severance packets to be applied to termination,
        including 

        - Includes additional notes 


        ### Options


        #### terminationChoice


        - Yes - This employee is leaving voluntarily

        - No - This user did not choose to leave


        #### Final Payment Details


        - They will be paid by cash or check

        - They will be paid by supplemental payroll

        - They will be paid by a different way

        - They will be paid during a regular payroll cycle

        - They have already been paid


        ### Notes:


        - Different from `deactivateUser` - terminated users cannot be
        reactivated

        - Includes severance payment options including payment over time and
        lump sum, and dismissal type tracking
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: terminateUser
                  example: terminateUser
                user:
                  type: object
                  properties:
                    userId:
                      type: string
                      format: uuid
                    companyId:
                      type: string
                      format: uuid
                    exitDate:
                      type: string
                    personalEmail:
                      type: string
                    finalPayCheckType:
                      type: string
                      title: Enum
                      enum:
                        - They will be paid by cash or check
                        - They will be paid by supplemental payroll
                        - They will be paid by a different way
                        - They will be paid during a regular payroll cycle
                        - They have already been paid
                    terminationChoice:
                      type: string
                      title: Enum
                      enum:
                        - Yes - This employee is leaving voluntarily
                        - No - This employee did not choose to leave
                    dismissalType:
                      type: string
                      title: Only used If employeeRefTerminationChoice is No
                      enum:
                        - Performance
                        - Attendance
                        - Other
                        - Layoff
                        - Location
                        - Seasonal
                        - Position Eliminated
                    severance:
                      type: boolean
                    severancePaymentType:
                      type: string
                      enum:
                        - No, the severance payments will be made over time
                        - Yes, it will be a one time severance payment
                    severancePaymentFrequency:
                      type: string
                      enum:
                        - Weekly, every Friday
                        - Bi-Weekly, Every other Friday
                        - Monthly, Last Day of the month
                        - Semi-Monthly, 15th and last day of month
                    firstSeverancePayDate:
                      type: string
                      maxLength: 10
                    lastSeverancePayDate:
                      type: string
                      maxLength: 10
                    severanceAmount:
                      type: integer
                    additionalNotes:
                      type: string
                  required:
                    - userId
                    - companyId
                    - exitDate
                    - personalEmail
                    - finalPayCheckType
                    - terminationChoice
                    - dismissalType
                    - severance
                    - severancePaymentType
                    - severancePaymentFrequency
                    - firstSeverancePayDate
                    - lastSeverancePayDate
                    - severanceAmount
              required:
                - method
                - user
            example:
              method: terminateUser
              user:
                userId: f9b2507d-c757-4c9a-9e96-0002299fa2f7
                companyId: eb869cf0-af11-4bdb-853c-fd2616bc91f2
                exitDate: '2023-09-09'
                personalEmail: mm@aa.ll
                finalPayCheckType: They have already been paid
                terminationChoice: No - This user did not choose to leave
                dismissalType: Layoff
                severance: true
                severancePaymentType: Yes, it will be a one time severance payment
                severancePaymentFrequency: Weekly, every Friday
                firstSeverancePayDate: '2023-09-09'
                lastSeverancePayDate: '2023-12-12'
                severanceAmount: 2333
                additionalNotes: terminated due to recession
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      userId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - userId
                      - status
                required:
                  - user
              examples:
                '1':
                  summary: Success
                  value:
                    user:
                      userId: f9b2507d-c757-4c9a-9e96-0002299fa2f7
                      status: Inactive
                      message: The User has been terminated successfully.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: UserId is mandatory and cannot be empty.
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                required:
                  - error
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````