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

# deactivateUser

> 
The `deactivateUser` API temporarily deactivates an employee or contractor.

### What it does:

- Deactivates users while preserving their records for potential reactivation
- Sets exit date and final paycheck details for the deactivated user
- Triggers an automated email explaining the deactivation to the employee
- Allows additional notes to be recorded - circumstances or employee specific details on deactivation

### Notes:

- Different from `terminateUser` - deactivated users can be reactivated with `activateUser`
- Used for temporary separations like leave of absence or seasonal layoffs



## OpenAPI

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

        The `deactivateUser` API temporarily deactivates an employee or
        contractor.


        ### What it does:


        - Deactivates users while preserving their records for potential
        reactivation

        - Sets exit date and final paycheck details for the deactivated user

        - Triggers an automated email explaining the deactivation to the
        employee

        - Allows additional notes to be recorded - circumstances or employee
        specific details on deactivation


        ### Notes:


        - Different from `terminateUser` - deactivated users can be reactivated
        with `activateUser`

        - Used for temporary separations like leave of absence or seasonal
        layoffs
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: deactivateUser
                  example: deactivateUser
                user:
                  type: object
                  properties:
                    userId:
                      type: string
                      format: uuid
                    exitDate:
                      type: string
                      maxLength: 10
                    personalEmail:
                      type: string
                      maxLength: 40
                    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
                    additionalNotes:
                      type: string
                      maxLength: 40
                  required:
                    - userId
                    - exitDate
                    - finalPayCheckType
                    - personalEmail
              required:
                - method
                - user
            example:
              method: deactivateUser
              user:
                userId: f9b2507d-c757-4c9a-9e96-0002299fa2f7
                exitDate: '2023-09-09'
                personalEmail: mm@aa.ll
                finalPayCheckType: They have already been paid
                additionalNotes: deactivating temporarily
      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
              example:
                user:
                  userId: f9b2507d-c757-4c9a-9e96-0002299fa2f7
                  status: Inactive
                  message: The User has been deactivated successfully.
          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: EmployeeId is mandatory and cannot be empty.
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````