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

# removeUsersFromRegularPayPeriod

> The `removeUsersFromRegularPayPeriod` API is used to remove employees from a regular pay period due to many different circumstances

### When to use:
- When there are employee terminations mid-pay period that need to be reflected in payroll
- When payroll corrections are needed to fix accidental additions before payroll processing

### Notes:
- Cannot remove all employees - at least one must remain in the pay period
- In the event that all employees need to be removed from a payroll use the `skipPayPeriod` API



## OpenAPI

````yaml post /payroll/removeUsersFromRegularPayPeriod
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
  - name: Sandbox
paths:
  /payroll/removeUsersFromRegularPayPeriod:
    post:
      tags: []
      summary: removeUsersFromRegularPayPeriod
      description: >-
        The `removeUsersFromRegularPayPeriod` API is used to remove employees
        from a regular pay period due to many different circumstances


        ### When to use:

        - When there are employee terminations mid-pay period that need to be
        reflected in payroll

        - When payroll corrections are needed to fix accidental additions before
        payroll processing


        ### Notes:

        - Cannot remove all employees - at least one must remain in the pay
        period

        - In the event that all employees need to be removed from a payroll use
        the `skipPayPeriod` API
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                companyId:
                  type: string
                payPeriodId:
                  type: string
                payrollLineItems:
                  type: array
                  items:
                    type: object
                    properties:
                      userId:
                        type: string
                      reason:
                        description: optional
                        type: string
                    required:
                      - userId
              required:
                - method
                - companyId
                - payPeriodId
                - payrollLineItems
            example:
              method: removeUsersFromRegularPayPeriod
              companyId: C8D57032-BF6F-4510-AA41-08A358365531
              payPeriodId: 81A0AE81-F817-4012-B058-46B2C0B9B72C
              payrollLineItems:
                - userId: BEC0E358-C9F5-4FEA-AED3-6A25C205F599
                  reason: sabatical vacation
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  payrollLineItems:
                    type: array
                    items:
                      type: object
                      properties:
                        userId:
                          type: string
                        status:
                          type: string
                        message:
                          type: string
                      required:
                        - userId
                        - status
                        - message
                required:
                  - payrollLineItems
              examples:
                '1':
                  summary: Success
                  value:
                    payrollLineItems:
                      - userId: BEC0E358-C9F5-4FEA-AED3-6A25C205F599
                        status: Removed
                        message: >-
                          The PayrollLineItem for Brendon Mcln has been removed
                          successfully.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: PayPeriodId is mandatory
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                required:
                  - error
              example:
                error:
                  code: 400
                  message: PayPeriodId is mandatory
          headers: {}
      deprecated: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.