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

# List Employees

> Get a paginated list of employees in a company with optional filtering

## Authentication

This endpoint requires Bearer token authentication with one of the following roles:

* `super_admin`
* `hr_manager`

## Path Parameters

<ParamField path="company_id" type="string" required>
  The unique identifier of the company (UUID format)
</ParamField>

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="page_size" type="integer" default="10">
  Number of items per page
</ParamField>

<ParamField query="status" type="string">
  Filter by employee status (active, inactive, on\_leave, terminated, probation)
</ParamField>

<ParamField query="department_id" type="string">
  Filter by department UUID
</ParamField>

<ParamField query="manager_id" type="string">
  Filter by manager UUID
</ParamField>

<ParamField query="employment_type" type="string">
  Filter by employment type (full\_time, part\_time, contract, intern)
</ParamField>

<ParamField query="search" type="string">
  Search by name or email
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="employees" type="array">
    Array of employee objects

    <ResponseField name="id" type="string">
      Employee UUID
    </ResponseField>

    <ResponseField name="company_id" type="string">
      Company UUID
    </ResponseField>

    <ResponseField name="email" type="string">
      Employee email address
    </ResponseField>

    <ResponseField name="phone" type="string">
      Employee phone number
    </ResponseField>

    <ResponseField name="first_name" type="string">
      Employee first name
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Employee last name
    </ResponseField>

    <ResponseField name="employee_code" type="string">
      Internal employee code
    </ResponseField>

    <ResponseField name="department_id" type="string">
      Department UUID
    </ResponseField>

    <ResponseField name="designation_id" type="string">
      Designation UUID
    </ResponseField>

    <ResponseField name="level_id" type="string">
      Level UUID
    </ResponseField>

    <ResponseField name="role_id" type="string">
      Role UUID
    </ResponseField>

    <ResponseField name="manager_id" type="string">
      Manager UUID
    </ResponseField>

    <ResponseField name="status" type="string">
      Employee status
    </ResponseField>

    <ResponseField name="employment_type" type="string">
      Employment type
    </ResponseField>

    <ResponseField name="date_of_birth" type="string" nullable>
      Date of birth (ISO 8601 format)
    </ResponseField>

    <ResponseField name="hire_date" type="string">
      Hire date (ISO 8601 format)
    </ResponseField>

    <ResponseField name="termination_date" type="string" nullable>
      Termination date (ISO 8601 format)
    </ResponseField>

    <ResponseField name="gender" type="string">
      Employee gender
    </ResponseField>

    <ResponseField name="address" type="string">
      Employee address
    </ResponseField>

    <ResponseField name="emergency_contact_name" type="string">
      Emergency contact name
    </ResponseField>

    <ResponseField name="emergency_contact_phone" type="string">
      Emergency contact phone
    </ResponseField>

    <ResponseField name="profile_image_url" type="string">
      Profile image URL
    </ResponseField>

    <ResponseField name="last_login_at" type="string" nullable>
      Last login timestamp (ISO 8601 format)
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp (ISO 8601 format)
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Last update timestamp (ISO 8601 format)
    </ResponseField>
  </ResponseField>

  <ResponseField name="pagination" type="object">
    <ResponseField name="page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="page_size" type="integer">
      Number of items per page
    </ResponseField>

    <ResponseField name="total_items" type="integer">
      Total number of items
    </ResponseField>

    <ResponseField name="total_pages" type="integer">
      Total number of pages
    </ResponseField>
  </ResponseField>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/employees?page=1&page_size=10&status=active&search=john" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```bash With Filters theme={null}
  curl -X GET "https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/employees?department_id=dept-uuid&employment_type=full_time" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "data": {
      "employees": [
        {
          "id": "emp-uuid-1",
          "company_id": "123e4567-e89b-12d3-a456-426614174000",
          "email": "john.doe@example.com",
          "phone": "+1234567890",
          "first_name": "John",
          "last_name": "Doe",
          "employee_code": "EMP001",
          "department_id": "dept-uuid-here",
          "designation_id": "desig-uuid-here",
          "level_id": "level-uuid-here",
          "role_id": "role-uuid-here",
          "manager_id": "manager-uuid-here",
          "status": "active",
          "employment_type": "full_time",
          "date_of_birth": "1990-01-15T00:00:00Z",
          "hire_date": "2024-01-01T00:00:00Z",
          "termination_date": null,
          "gender": "Male",
          "address": "123 Main St, City, State",
          "emergency_contact_name": "Jane Doe",
          "emergency_contact_phone": "+1987654321",
          "profile_image_url": "",
          "last_login_at": "2024-03-01T15:30:00Z",
          "created_at": "2024-01-01T10:00:00Z",
          "updated_at": "2024-03-01T15:30:00Z"
        }
      ],
      "pagination": {
        "page": 1,
        "page_size": 10,
        "total_items": 45,
        "total_pages": 5
      }
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "message": "invalid department_id"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "message": "insufficient role"
  }
  ```
</ResponseExample>
