> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Employees For Payroll

> Searches employee-seat roles by name, email or IDs (accent-folded fallback) within a payroll run country scope, flagging paid/terminated.

Required scope: `payroll:read`

## OpenAPI

````yaml api-reference/openapi.json GET /hris/search-employees-for-payroll
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/search-employees-for-payroll:
    get:
      operationId: searchEmployeesForPayroll
      summary: Search Employees For Payroll
      x-toku-required-scope: payroll:read
      description: >-
        Searches employee-seat roles by name, email or IDs (accent-folded
        fallback) within a payroll run country scope, flagging paid/terminated.


        Required scope: `payroll:read`
      parameters:
        - name: searchQuery
          in: query
          required: false
          schema:
            type: string
            default: ''
        - name: payrollRunID
          in: query
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchEmployeesForPayrollResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SearchEmployeesForPayrollResponse:
      type: array
      items:
        type: object
        properties:
          roleInOrgID:
            type:
              - string
              - 'null'
          roleInOrgId:
            type:
              - string
              - 'null'
          givenName:
            type:
              - string
              - 'null'
          familyName:
            type:
              - string
              - 'null'
          email:
            type:
              - string
              - 'null'
          avatarUrl:
            type:
              - string
              - 'null'
          employeeId:
            type:
              - string
              - 'null'
          hrisPayslipID:
            type:
              - string
              - 'null'
          positionID:
            type:
              - string
              - 'null'
          orgID:
            type:
              - string
              - 'null'
          orgName:
            type:
              - string
              - 'null'
          inPayrollRun:
            type:
              - boolean
              - 'null'
          isTerminated:
            type:
              - boolean
              - 'null'
          person:
            type:
              - object
              - 'null'
            properties:
              givenName:
                type:
                  - string
                  - 'null'
              familyName:
                type:
                  - string
                  - 'null'
              email:
                type:
                  - string
                  - 'null'
              avatarUrl:
                type:
                  - string
                  - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
