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

# importRegularDifferentialPayrollData

> 
The `importRegularDifferentialPayrollData` 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.
- Defaults 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

---
### Async Import:
- This method will return before the import fully completes to prevent unecessary blocking.
- Once the import completes a `payperiod.payperiodstatus.update` webhook is fired to indicate ther import was successful.
- The payload is validated before returning, and while the import is ongoing. An error in the response or webhook body indicates one or more employees' data needs correcting and re-importing
- For more details please see the [Payroll Processing Guide](https://developer.rollfi.xyz/docs/PayrollProcessing)



## OpenAPI

````yaml post /payroll/importRegularDifferentialPayrollData
openapi: 3.1.0
info:
  title: Default module
  description: |
    Webhook events emitted when a company's KYB status is created or changes.

    Rollfi sends these requests to the webhook URL configured for the client.
    Consumers should return a successful 2xx response after accepting the event.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Admin Portal
  - name: TimeOff Admin
  - name: TimeTracking Admin
  - name: TimeOff User
  - name: TimeTracking User
  - name: TimeTracking Reports
  - name: TimeOff Reports
  - name: Pay Schedule Webhooks
  - name: Pay Period Webhooks
  - name: Employee Bank Account Webhooks
  - name: Employee KYC Webhooks
  - name: Company Bank Account Webhooks
  - name: Company Webhooks
  - name: Employee Status Webhooks
paths:
  /payroll/importRegularDifferentialPayrollData:
    post:
      tags: []
      summary: importRegularDifferentialPayrollData
      description: >-

        The `importRegularDifferentialPayrollData` 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.

        - Defaults 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


        ---

        ### Async Import:

        - This method will return before the import fully completes to prevent
        unecessary blocking.

        - Once the import completes a `payperiod.payperiodstatus.update` webhook
        is fired to indicate ther import was successful.

        - The payload is validated before returning, and while the import is
        ongoing. An error in the response or webhook body indicates one or more
        employees' data needs correcting and re-importing

        - For more details please see the [Payroll Processing
        Guide](https://developer.rollfi.xyz/docs/PayrollProcessing)
      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: importRegularDifferentialPayrollData
              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: []

````