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

# addBusinessUser

> The `addBusinessUser` API is used to create a Business User and define their permissions and responsibilities within the system.

### What it does:

- Creates a Business User with defined roles and permissions
- Establishes user access levels based on assigned roles providing role-based functionality
- Supports multiple role assignments for flexible user management

### Business User Roles:

A Business User can have one or more of these roles:

| Role | Description |
|------|-------------|
|**Payroll Admin**| Full access to payroll processing and management functions |
|**Beneficial Owner**| Legal ownership stake in the company (*At least 25% share must be stated*) |
|**Book Keeper**| Usually limited access to read-only for company accounting purposes and reporting |


### Notes:

- At least one beneficial owner with at least 25% share of the company must be registered to the system for compliance. A sole beneficial owner cannot be deleted before another is added.
- For beneficial owners **dateOfBirth**, **address1**, **address2**, **city**, **state**, **zipcode**, ssn and ownershipPercentage are mandatory for compliance purposes.



## OpenAPI

````yaml post /companyOnboarding/addBusinessUser
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /companyOnboarding/addBusinessUser:
    post:
      tags: []
      summary: addBusinessUser
      description: >-
        The `addBusinessUser` API is used to create a Business User and define
        their permissions and responsibilities within the system.


        ### What it does:


        - Creates a Business User with defined roles and permissions

        - Establishes user access levels based on assigned roles providing
        role-based functionality

        - Supports multiple role assignments for flexible user management


        ### Business User Roles:


        A Business User can have one or more of these roles:


        | Role | Description |

        |------|-------------|

        |**Payroll Admin**| Full access to payroll processing and management
        functions |

        |**Beneficial Owner**| Legal ownership stake in the company (*At least
        25% share must be stated*) |

        |**Book Keeper**| Usually limited access to read-only for company
        accounting purposes and reporting |



        ### Notes:


        - At least one beneficial owner with at least 25% share of the company
        must be registered to the system for compliance. A sole beneficial owner
        cannot be deleted before another is added.

        - For beneficial owners **dateOfBirth**, **address1**, **address2**,
        **city**, **state**, **zipcode**, ssn and ownershipPercentage are
        mandatory for compliance purposes.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addBusinessUser
                  example: addBusinessUser
                businessUser:
                  type: object
                  properties:
                    companyId:
                      type: string
                      format: uuid
                    firstName:
                      type: string
                      maxLength: 40
                    middleName:
                      type: string
                      maxLength: 40
                    lastName:
                      type: string
                      maxLength: 40
                    phoneNumber:
                      type: string
                      title: Must be 10 digits
                      example: '9874563210'
                    email:
                      type: string
                      maxLength: 35
                    address1:
                      type: string
                      maxLength: 40
                    address2:
                      type: string
                      maxLength: 40
                    city:
                      type: string
                      maxLength: 40
                    state:
                      type: string
                      title: Enum
                      maxLength: 2
                      enum:
                        - TX
                        - AK
                        - ND
                        - IL
                        - MA
                        - KS
                        - AS
                        - AL
                        - UT
                        - SD
                        - MI
                        - DC
                        - GA
                        - SC
                        - TN
                        - OK
                        - CO
                        - CA
                        - ME
                        - MO
                        - WY
                        - MD
                        - VT
                        - NM
                        - CT
                        - AZ
                        - WI
                        - VA
                        - WV
                        - NJ
                        - DE
                        - NC
                        - PR
                        - IN
                        - MT
                        - NH
                        - HI
                        - IA
                        - KY
                        - WA
                        - OH
                        - FL
                        - OR
                        - MP
                        - GU
                        - MN
                        - MS
                        - PA
                        - NE
                        - RI
                        - ID
                        - LA
                        - NY
                        - NV
                        - AR
                    zipcode:
                      type: string
                      title: Must be Five or Nine Digits
                    ssn:
                      type: string
                      title: Must be 9 Digits
                      example: 659-56-4561
                    dateOfBirth:
                      type: string
                      example: YYYY-MM-DD
                    payrollAdmin:
                      type: boolean
                    bookKeeper:
                      type: boolean
                    beneficialOwner:
                      type: boolean
                    ownershipPercentage:
                      type: number
                      title: 'Must be specified for Beneficial Owner '
                  required:
                    - companyId
                    - firstName
                    - lastName
                    - phoneNumber
                    - email
                  x--orders:
                    - firstName
                    - lastName
                    - phoneNumber
                    - email
                    - address1
                    - city
                    - state
                    - zipcode
                    - country
                    - isPayrollAdmin
                    - isController
                    - isBeneficialOwner
                    - companyId
                    - middleName
                    - address2
                    - ssn
                    - ownershipPercentage
                    - isEmployee
              required:
                - method
                - businessUser
              x--orders:
                - method
                - businessUser
            example:
              method: addBusinessUser
              businessUser:
                companyId: 8A9B7683-8E02-494D-8422-963FD05EE785
                firstName: Tim
                middleName: ''
                lastName: David
                phoneNumber: '9889890989'
                email: tim@david.xyz
                address1: 8745 Colard Ln
                address2: ''
                city: Lyons
                state: CO
                zipcode: '80540'
                ssn: '123098989'
                dateOfBirth: '2000-09-09'
                payrollAdmin: true
                bookKeeper: true
                beneficialOwner: true
                ownershipPercentage: 25
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  businessUser:
                    type: object
                    properties:
                      businessUserId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - businessUserId
                      - status
                    x--orders:
                      - businessUserId
                      - status
                      - message
                required:
                  - businessUser
                x--orders:
                  - businessUser
              examples:
                '1':
                  summary: Success
                  value:
                    businessUser:
                      businessUserId: 5370FF7F-9FFF-401A-A949-AFB393B50F09
                      status: KYC Pending
                      message: Tim David has been successfully added as BusinessUser.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Phone Number should not exceed 10 digits.
          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 companyId
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````