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

# Preview Employees Sync

> Fetches employees from the org employee-integration source (ADP/Workday/Deel/UKG/BambooHR) with filters applied, no writes.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/preview-employees-sync
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/preview-employees-sync:
    post:
      operationId: previewEmployeesSync
      summary: Preview Employees Sync
      description: >-
        Fetches employees from the org employee-integration source
        (ADP/Workday/Deel/UKG/BambooHR) with filters applied, no writes.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewEmployeesSyncRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewEmployeesSyncResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    PreviewEmployeesSyncRequest:
      type: object
      properties:
        orgID:
          type: string
        filters:
          oneOf:
            - $ref: '#/components/schemas/PreviewEmployeesSyncQueryBuilderFilters'
            - $ref: '#/components/schemas/PreviewEmployeesSyncLegacyFilters'
          description: >-
            NOTE(ck): a recursive z.lazy() schema has no contract form; TGA
            still checks it
    PreviewEmployeesSyncQueryBuilderFilters:
      type: object
      properties:
        version:
          const: '2.0'
        rootGroup: {}
      required:
        - version
        - rootGroup
    PreviewEmployeesSyncLegacyFilters:
      type: object
      properties:
        email:
          type: string
        givenName:
          type: string
        familyName:
          type: string
        externalEmployeeID:
          type: array
          items:
            type: string
        positionID:
          type: string
        country:
          type: array
          items:
            type: string
        employmentType:
          type: array
          items:
            type: string
        subEmploymentType:
          type: string
        remarks:
          type: string
        payrollEntity:
          type: string
        payrollGroup:
          type: string
        baseSalaryGreaterThan:
          type: number
        baseSalaryLessThan:
          type: number
        baseSalaryCurrency:
          type: array
          items:
            type: string
        department:
          type: string
        address:
          type: string
        excludeTerminated:
          type: boolean
        isActive:
          type: boolean
    PreviewEmployeesSyncResponse:
      type: object
      properties:
        success:
          type: boolean
        totalRecords:
          type: number
        filteredRecords:
          type: number
        employees:
          type: array
          items:
            type: object
            properties:
              email:
                type:
                  - string
                  - 'null'
              givenName:
                type:
                  - string
                  - 'null'
              familyName:
                type:
                  - string
                  - 'null'
              externalEmployeeID:
                type:
                  - string
                  - 'null'
              positionID:
                type:
                  - string
                  - 'null'
              country:
                type:
                  - string
                  - 'null'
              employmentType:
                type:
                  - string
                  - 'null'
              subEmploymentType:
                type:
                  - string
                  - 'null'
              remarks:
                type:
                  - string
                  - 'null'
              payrollEntity:
                type:
                  - string
                  - 'null'
              payrollGroup:
                type:
                  - string
                  - 'null'
              baseSalary:
                oneOf:
                  - type: string
                  - type: number
              baseSalaryCurrency:
                type:
                  - string
                  - 'null'
              department:
                type:
                  - string
                  - 'null'
              address:
                type:
                  - string
                  - 'null'
              payrollFileNumber:
                type:
                  - string
                  - 'null'
              isTerminated:
                type:
                  - boolean
                  - 'null'
              isActive:
                type:
                  - boolean
                  - 'null'
      required:
        - success
        - totalRecords
        - filteredRecords
        - employees
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
