# List staff

**Staff directory and human resource management with organizational structure**
This comprehensive HR endpoint provides complete staff management including:
- Employee directory with advanced search capabilities
- Department and organizational structure integration
- Role-based staff categorization and filtering
- Active/inactive employee status management
- Multi-field name search with partial matching

**HR Management Capabilities:**
- Complete employee directory with contact information
- Department-based organizational structure tracking
- Staff type and role classification system
- Active employee status for current workforce analysis
- Employee search across first and last names

**Organizational Features:**
- Department hierarchy and staff allocation
- Role-based access and staff type categorization
- Employee status management (active/inactive)
- Contact information and communication data
- Staff reference and external system integration

**Search and Filter Options:**
- Multi-field name search (first name, last name)
- Department-based staff filtering
- Active status filtering for current employees
- Role and staff type categorization
- Alphabetical sorting for directory listings

**Business Applications:**
- Employee directory and contact management
- HR reporting and organizational analysis
- Department staff allocation and planning
- Employee onboarding and management workflows
- Integration with external HR and payroll systems

**Directory Features:**
- Complete contact information management
- Department and role relationship tracking
- Staff reference system for external integration
- Employee status and lifecycle management

**Real Example:**

```bash
curl --location 'https://{{host}}/v1/staff' \
--data '{
  "pageSize": 25,
  "page": 0
}'
```
**Permissions:**

Endpoint: POST /gql/v1/staff
Version: 1.0.0
Security: BearerAuth

## Request fields (application/json):

  - `pageSize` (integer)
    Maximum number of staff records to return
    Example: 25

  - `page` (integer)
    Page number for pagination (0-based)
    Example: 0

  - `isActive` (boolean)
    Filter by active employee status
    Example: true

  - `departmentId` (integer)
    Filter staff by specific department ID
    Example: 7

  - `nameSearch` (string)
    Search term for first and last names (use % for wildcard)
    Example: %

  - `sortOrder` (string)
    Sort order for staff names
    Enum: "asc", "desc"

## Response 200 fields (application/json):

  - `deid_staff` (array)

  - `deid_staff.id` (integer)
    Unique staff identifier
    Example: 202

  - `deid_staff.pmsRef` (string)
    PMS reference identifier
    Example: 2254

  - `deid_staff.firstName` (string)
    Staff member first name
    Example: Holley

  - `deid_staff.lastName` (string)
    Staff member last name
    Example: Abbott

  - `deid_staff.email` (string)
    Primary email address
    Example: ena.toy@hotmail.com

  - `deid_staff.active` (boolean)
    Whether the staff member is active
    Example: true

  - `deid_staff.deptId` (integer)
    Department identifier
    Example: 8

  - `deid_staff.jobTitle` (string)
    Job title of the staff member
    Example: null

  - `deid_staff.type` (string)
    Staff member type or category
    Example: null

  - `deid_staff.officeId` (integer)
    Office identifier where the staff member is based
    Example: 2

  - `deid_staff.staffManagerId` (integer)
    Identifier of the staff member's manager
    Example: null

  - `deid_staff_aggregate` (object)

  - `deid_staff_aggregate.aggregate` (object)

  - `deid_staff_aggregate.aggregate.count` (integer)
    Total number of staff records matching criteria
    Example: 138

## Response 400 fields (application/json):

  - `error` (string)

  - `code` (string)

## Response 401 fields (application/json):

  - `error` (string)

  - `code` (string)

## Response 500 fields (application/json):

  - `error` (string)

  - `code` (string)

