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

# List Survey Rows

> The employees table as one row per mobility survey: answered, pending or blank

[← Employees API](/api-reference/employees/overview)

Retrieve the employees table as one row per mobility survey. There are three kinds of row:

* **`response`**: an answered survey. One row however many commutes the answer holds (the respondent changed address or transport within the period): `commute_count`, `period_ids` and the summed `co2e`. A commute that answers no survey (QR, file upload, older data) is a response row of its own.
* **`pending`**: a survey sent and not answered yet. Sending the same survey again (same employee, period and template) updates this row instead of adding one.
* **`employee`**: a person with no response and no pending survey.

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID
</ParamField>

### Query Parameters

It takes the same perimeter, `search` and column filters as [List Employees (V2)](/api-reference/employees/list-v2): `consolidate_group`, `organization_id[]`, `filter_by`, `filter_match`, `filter_or_fields`, plus `page` and `size`. `filter_by` applies to the row columns below; `period_date:rd[from,to]` keeps the rows whose period lies in the range.

<ParamField query="sort_by" type="string">
  Sort as `field:asc$other:desc`. Rows then follow the newest created, then the newest updated.

  **Fields:** `email`, `name`, `organization_name`, `start_date`, `end_date`, `status`, `response_medium`, `survey_template_name`, `sent_at`, `send_count`, `responded_at`, `created_at`, `updated_at`, `co2e`, `commuting_type`, `transport_type`, `fuel_type`, `total_km`, `daily_trips`, `hours_worked_per_day`, `carpool`

  **Example:** `sort_by=sent_at:desc`
</ParamField>

## Response

<ResponseField name="items" type="array[object]">
  <Expandable title="properties">
    <ResponseField name="id" type="string">Row id (the survey, the commute or the employee)</ResponseField>
    <ResponseField name="row_type" type="string">`response`, `pending` or `employee`</ResponseField>
    <ResponseField name="employee_id" type="string">The row's employee</ResponseField>
    <ResponseField name="employee_survey_id" type="string | null">The row's survey, when there is one</ResponseField>
    <ResponseField name="period_ids" type="array[string]">The commutes of the response</ResponseField>
    <ResponseField name="commute_count" type="integer">How many commutes the response holds</ResponseField>
    <ResponseField name="status" type="string">`pending`, `no_response`, or the response's situation (`active`, `inactive`, `terminated`)</ResponseField>
    <ResponseField name="start_date" type="date | null">The survey's (or commute's) period start</ResponseField>
    <ResponseField name="end_date" type="date | null">The survey's (or commute's) period end</ResponseField>
    <ResponseField name="sent_at" type="datetime | null">Last time the survey was sent</ResponseField>
    <ResponseField name="send_count" type="integer">How many times it was sent</ResponseField>
    <ResponseField name="responded_at" type="datetime | null">When it was answered</ResponseField>
    <ResponseField name="co2e" type="number | null">kg CO2e of the response (null when not calculated)</ResponseField>
    <ResponseField name="calculation_status" type="string | null">`calculated`, `calculating` or `not_calculated`</ResponseField>
    <ResponseField name="employee_row_count" type="integer">Every row of the employee (unfiltered)</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="integer">Total rows matching the filters</ResponseField>

<ResponseField name="filter_hash" type="string">
  Hash of the filters, required by the bulk actions over every matching row: `POST /v2/employees/survey-rows/delete-preview`, `/delete` (with `delete_orphan_employees`), `/resend-preview` and `/resend` (with `only_pending`). They need write permission.
</ResponseField>


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