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

# importDifferentialPayrollData

> 
The `importDifferentialPayrollData` API adds regular differential payroll data for processing.

### What it does:

- Adds payroll data with differential pay rates for employees
- Allows varying pay rate using a **payCode** for employees who operate in different roles with different pay scales

### Notes:
- To allow `miscellaneousStateTaxes` to be imported to payroll, please refer to the `addEmployeeMiscellaneousStateTax` API
- An employee's available miscellaneousStateTax items can be retrieved using 'getEmployeeMiscellaneousStateTaxforPayroll`
---

### Specifying Payment Method:

- PaymentMethod can be specified for each employee in the request.
- Defauls to the method in the user's wage details.
- Employees can only be set to Direct Deposit if the employee has a connected bank account
- Employees will be switched only for the pay period you are currently importing for. Subsequent pay periods will default back to the user wage



## OpenAPI

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

        The `importDifferentialPayrollData` API adds regular differential
        payroll data for processing.


        ### What it does:


        - Adds payroll data with differential pay rates for employees

        - Allows varying pay rate using a **payCode** for employees who operate
        in different roles with different pay scales


        ### Notes:

        - To allow `miscellaneousStateTaxes` to be imported to payroll, please
        refer to the `addEmployeeMiscellaneousStateTax` API

        - An employee's available miscellaneousStateTax items can be retrieved
        using 'getEmployeeMiscellaneousStateTaxforPayroll`

        ---


        ### Specifying Payment Method:


        - PaymentMethod can be specified for each employee in the request.

        - Defauls to the method in the user's wage details.

        - Employees can only be set to Direct Deposit if the employee has a
        connected bank account

        - Employees will be switched only for the pay period you are currently
        importing for. Subsequent pay periods will default back to the user wage
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                companyId:
                  type: string
                payPeriodId:
                  type: string
                payrollData:
                  type: array
                  items:
                    type: object
                    properties:
                      userId:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
                      paymentMethod:
                        type: string
                        enum:
                          - Check
                          - Direct Deposit
                        description: >-
                          Defaults to the method in the user's wage details. Can
                          only be set to Direct Deposit if the employee has a
                          connected bank account
                      basePay:
                        type: array
                        items:
                          type: object
                          properties:
                            payCode:
                              type: string
                            payRate:
                              type: integer
                            payHours:
                              type: integer
                            multiplier:
                              type: integer
                            amount:
                              type: integer
                          required:
                            - payCode
                            - payRate
                            - payHours
                            - amount
                      additionalCompensations:
                        type: array
                        items:
                          type: object
                          properties:
                            description:
                              type: string
                            amount:
                              type: integer
                      deductions:
                        type: array
                        items:
                          type: object
                          properties:
                            description:
                              type: string
                            amount:
                              type: integer
                          required:
                            - description
                            - amount
                      reimbursements:
                        type: array
                        items:
                          type: object
                          properties:
                            reimbursementType:
                              type: string
                            amount:
                              type: integer
                          required:
                            - reimbursementType
                            - amount
                      miscellaneousStateTaxes:
                        type: array
                        items:
                          type: object
                          properties:
                            stateCode:
                              type: string
                            taxName:
                              type: string
                            taxDetails:
                              type: array
                              items:
                                type: object
                                properties:
                                  riskClassName:
                                    type: string
                                  noOfHours:
                                    type: number
                    required:
                      - userId
                      - firstName
                      - lastName
                      - basePay
              required:
                - method
                - companyId
                - payPeriodId
                - payrollData
            example:
              method: importDifferentialPayrollData
              companyId: 68D29B82-86FA-4B51-B16E-01346BD3F43B
              payPeriodId: 2412217E-E92A-46D5-A359-DF715FBF28CD
              payrollData:
                - userId: CE934E2C-00A5-46A1-B925-CBD97BF07AF8
                  firstName: Emmanuel
                  lastName: Golden
                  paymentMethod: Direct Deposit
                  basePay:
                    - payHours: 8.75
                      payRate: 0
                      payCode: BASE_PAY
                      multiplier: 1
                      amount: 0
                    - payHours: 0.75
                      payRate: 20
                      payCode: '1151'
                      multiplier: 1
                      amount: 15
                  additionalCompensations:
                    - amount: 310
                      description: Van Pool & Transit Passes
                  deductions:
                    - description: Qualified Parking Sup
                      amount: 120
                  reimbursements:
                    - reimbursementType: GYM
                      amount: 120
                  miscellaneousStateTaxes:
                    - stateCode: WA
                      taxName: Washington L&I
                      taxDetails:
                        - riskClassName: Shop - Intra State Trucking
                          noOfHours: 6
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  importDifferntiaPayrollData:
                    type: object
                    properties:
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - status
                      - message
                required:
                  - importDifferntiaPayrollData
              examples:
                '1':
                  summary: Success
                  value:
                    importDifferntiaPayrollData:
                      status: Ready
                      message: Imported Differential Payroll Data Successfully
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Invalid Payroll Details
                '3':
                  summary: Partial Success
                  value:
                    status: Ready
                    message: Payroll data imported successfully
                    validationWarning:
                      message: >-
                        Payroll changes not processed for 1 user(s) due to
                        negative net pay or invalid payment method
                      userIds:
                        - 4DF5A79A-3735-4588-95A6-B80D15CB5A5E
          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

````