---
title: "Get Employees for Status Grouping"
method: POST
path: "/tsa/v2/employees-for-status-grouping"
tags: ["Timesheet Approval"]
---

# Get Employees for Status Grouping

`POST /tsa/v2/employees-for-status-grouping`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api`
- URL: `https://your-subdomain.deputy.deputy.com/api/tsa/v2/employees-for-status-grouping`
- Auth: API key in header `OAuth`

Get paginated list of employee IDs grouped by timesheet status for the groupByStatus feature. Employees with pending timesheets are grouped first, followed by employees with no pending timesheets.

## Request body

- GetEmployeesForStatusGroupingRequestGetEmployeesForStatusGroupingRequestBody
  - `dateFrom` string: start of date range, inclusive, `Y-m-d`
  - `dateTo` string: end of date range, inclusive, `Y-m-d`
  - `cursor` string: pagination cursor for getting next page of results
  - `limit` integer: maximum number of employee IDs to return (default 50)
  - `areaIds` integer[]: filter by operational unit area IDs
  - `employeeNameQuery` string: search employees by first name, last name, or display name
  - `leaveLocationIds` integer[]: filter by employee location IDs (employee.company)
  - `reviewState` string: filter by timesheet review state
  - `subordinateEmployeeIds` integer[]: restrict results to specific subordinate employee IDs

## Response `200`

A successful response.

- TsaGetEmployeesForStatusGroupingResponse
  - `success` boolean
  - `data` GetEmployeesForStatusGroupingResponseGetEmployeesForStatusGroupingResponseBody
    - `employeeIds` integer[]: sorted list of unique employee IDs ordered by approval status and first name
    - `nextCursor` string: cursor for next page of results, empty if no more results

---

[API](https://skmtc.dev/deputy/apis/deputy-v2-api.md) - [All operations](https://skmtc.dev/deputy/apis/deputy-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deputy/apis/deputy-v2-api/revisions/78f0278f4608?raw)
