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

# addFormerUser

> The `addFormerUser` API adds a terminated user to the system.

### Use when:
- `formerPaidThisYear` = true during onboarding
- You have an employee that has been paid this year but is no longer at the company at the point of onboarding

### Notes:
- Used to maintain compliance for payroll and to calculate accurate employer taxes




## OpenAPI

````yaml post /adminPortal/addFormerUser
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/addFormerUser:
    post:
      tags: []
      summary: addFormerUser
      description: >
        The `addFormerUser` API adds a terminated user to the system.


        ### Use when:

        - `formerPaidThisYear` = true during onboarding

        - You have an employee that has been paid this year but is no longer at
        the company at the point of onboarding


        ### Notes:

        - Used to maintain compliance for payroll and to calculate accurate
        employer taxes
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                employee:
                  type: object
                  properties:
                    companyId:
                      type: string
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                    workerType:
                      type: string
                      enum:
                        - W2
                        - 1099-NEC
                    ssn:
                      type: string
                    dateOfBirth:
                      type: string
                    address1:
                      type: string
                    address2:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    zipcode:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    companyLocationCategory:
                      type: string
                    stateCode:
                      type: string
                      description: Required if companyLocationCategory = Remote
                    companyLocationId:
                      type: string
                      description: Required if companyLocationCategory = Office
                  required:
                    - companyId
                    - firstName
                    - lastName
                    - workerType
                    - ssn
                    - dateOfBirth
                    - address1
                    - city
                    - state
                    - zipcode
                    - startDate
                    - endDate
                    - companyLocationCategory
              required:
                - method
                - employee
            example:
              method: addFormerUser
              employee:
                companyId: 33B0F117-6C2B-4DEB-AB3C-6AF54182A748
                firstName: John
                middleName: ''
                lastName: Doe
                workerType: W2
                ssn: '123000630'
                dateOfBirth: '1990-05-15'
                address1: 123 Main Street
                address2: Apt 4B
                city: New York
                state: NY
                zipcode: '10001'
                startDate: '2020-01-15'
                endDate: '2026-03-29'
                companyLocationCategory: Remote
                stateCode: NY
      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
                    x--orders:
                      - EmployeeID
                      - Status
                      - Message
                required:
                  - user
                x--orders:
                  - Employee
              examples:
                '1':
                  summary: Success
                  value:
                    formerUser:
                      userId: 16684041-4DA6-4525-AAE3-39EEB684E4D3
                      status: Success
                      message: Former user Jimmy Do has been added successfully.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: FirstName is required
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                error:
                  code: 400
                  message: Invalid company ID. Company does not exist.
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````