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

# List clients with participants

> List clients that have participants for a specific plan year with filtering, sorting, and pagination. Includes plan information, payroll status, employee counts, and error counts.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /packages/retirement/participants/{py}/_clients
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /packages/retirement/participants/{py}/_clients:
    post:
      tags:
        - packages
      summary: List clients with participants
      description: >-
        List clients that have participants for a specific plan year with
        filtering, sorting, and pagination. Includes plan information, payroll
        status, employee counts, and error counts.
      parameters:
        - description: Plan year
          name: py
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_packages_retirement_participants.ListClientsRequest
        description: List clients request
        required: true
      responses:
        '200':
          description: List of clients with participant data
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_packages_retirement_participants.ListParticipantClientsResponse
        '400':
          description: Bad request - invalid plan year or request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_packages_retirement_participants.ListClientsRequest:
      type: object
      properties:
        filters:
          $ref: >-
            #/components/schemas/pkg_routes_packages_retirement_participants.ListClientsFilters
        page:
          $ref: '#/components/schemas/types.ListPagination'
        sort:
          $ref: '#/components/schemas/types.ListSort'
    pkg_routes_packages_retirement_participants.ListParticipantClientsResponse:
      type: object
      properties:
        clients:
          type: array
          items:
            $ref: >-
              #/components/schemas/pkg_routes_packages_retirement_participants.ParticipantClient
        total:
          type: integer
    pkg_routes_packages_retirement_participants.ListClientsFilters:
      type: object
      properties:
        assignee:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        parent_plan:
          type: string
        payroll_provider:
          type: array
          items:
            type: string
        payroll_status:
          type: array
          items:
            type: string
        plan_structure:
          type: array
          items:
            type: string
        plan_type:
          description: Plan types
          type: array
          items:
            type: string
        search:
          type: string
        status:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    pkg_routes_packages_retirement_participants.ParticipantClient:
      type: object
      properties:
        _id:
          description: client._id
          type: string
        employees:
          type: integer
        errors:
          type: integer
        name:
          type: string
        payroll:
          $ref: '#/components/schemas/types.PayrollConfig'
        plans:
          type: array
          items:
            $ref: >-
              #/components/schemas/pkg_routes_packages_retirement_participants.ParticipantClientPlan
        status:
          type: string
        tags:
          type: array
          items:
            type: string
    types.ListFilterData:
      type: object
      properties:
        key:
          type: string
        op:
          type: string
        value: {}
    types.PayrollConfig:
      type: object
      properties:
        active:
          type: boolean
        connect360:
          type: boolean
        connection_id:
          description: Finch Connect ID
          type: string
        credentials:
          type: string
        error:
          type: string
        frequency:
          type: string
        integration:
          type: string
        last_sync:
          type: string
        mapping:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMapping'
        message:
          type: string
        pending_reports:
          type: integer
        providers:
          type: array
          items:
            type: string
        session_expires_at:
          description: Finch Connect Session Expiry
          type: string
        session_id:
          description: Finch Connect Session ID
          type: string
        source:
          type: string
        statuses:
          type: array
          items:
            type: string
        trigger:
          description: The trigger that initiated the sync
          type: string
    pkg_routes_packages_retirement_participants.ParticipantClientPlan:
      type: object
      properties:
        _id:
          type: string
        client:
          type: string
        status:
          type: string
        type:
          type: string
    types.PayrollAPIMapping:
      type: object
      properties:
        ee_pre_tax:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        ee_roth:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        er_match:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        er_non_elective:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        er_qaca_match:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        er_safe_harbor_match:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        er_safe_harbor_non_elective:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        hpi_compensation:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        ignore:
          description: >-
            Fields to ignore - if there is a new field that's not in this list,
            we will flag for review
          type: array
          items:
            type: string
        loan_repayment:
          description: >-
            Loan repayments (spec 5.10): collected into
            employee_census.loan_payments, not compensation.
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        plan:
          description: For each field, we take the sum of all sources
          type: string
        plan_compensation:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        prevailing_wage:
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
        statutory_compensation:
          description: This is the base salary
          type: array
          items:
            $ref: '#/components/schemas/types.PayrollAPIMappingSource'
    types.PayrollAPIMappingSource:
      type: object
      properties:
        minus:
          description: >-
            If any of these are empty, we won't look at them. At least one has
            to be set
          type: boolean
        name:
          description: The name of the source
          type: string
        type:
          description: 'The type of source: Earnings, Taxes, Contributions'
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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