> ## 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.

# Get Commuting Response (v2)

> Read one commuting response: its period, its modes and the answers to your own survey questions

[← Employees API](https://code.dcycle.io/api-reference/employees/overview.md)

Read a response of an employee as it is stored: its period, how the employee worked (its **modes**, each with the
commuting period that holds it) and the answers to your organization's own survey questions. A response is what a
record of [Create Commuting Periods (v2)](https://code.dcycle.io/api-reference/employees/commuting-create-v2.md) writes, and what the app's
form, the survey and the Data Importer write: its id is the `entity_id` of the record's
[job item](https://code.dcycle.io/api-reference/ingest-jobs/list-items.md). To change it, send it whole to
[Replace Commuting Response (v2)](https://code.dcycle.io/api-reference/employees/commuting-response-replace-v2.md).

> [!WARNING]
>
> **Beta.** Part of the bulk ingest API, in beta. The contract may still change before general availability.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.dcycle.io/v2/employees/commuting/responses/9f8e7d6c-5b4a-4392-8f1e-0d9c8b7a6f5e" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import os

import requests

response = requests.get(
    "https://api.dcycle.io/v2/employees/commuting/responses/9f8e7d6c-5b4a-4392-8f1e-0d9c8b7a6f5e",
    headers={"x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"]},
    timeout=30,
)
response.raise_for_status()
print(response.json()["modes"])
```

```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "9f8e7d6c-5b4a-4392-8f1e-0d9c8b7a6f5e",
  "employee_id": "2b1a0f9e-8d7c-4b6a-9f5e-4d3c2b1a0f9e",
  "start_date": "2026-01-01",
  "end_date": "2026-06-30",
  "situation": "active",
  "response_medium": "manual",
  "is_anonymous": false,
  "modes": [
    {
      "work_model": "in_person",
      "period_id": "8e7d6c5b-4a39-4281-8f7e-6d5c4b3a2918",
      "transport_type": "car",
      "vehicle_size": "medium",
      "fuel_type": "petrol",
      "renewable_energy": null,
      "carpool": true,
      "days": ["monday", "tuesday"],
      "distance_km": 18,
      "origin": null,
      "destination": null,
      "daily_trips": 1,
      "custom_ef_record_id": null
    },
    {
      "work_model": "telecommuting",
      "period_id": "8e7d6c5b-4a39-4281-8f7e-6d5c4b3a2918",
      "days": ["thursday", "friday"],
      "total_hours": null,
      "hours_per_day": 8,
      "custom_ef_record_id": null
    }
  ],
  "custom_responses": { "parking": "company_car_park" },
  "period_ids": ["8e7d6c5b-4a39-4281-8f7e-6d5c4b3a2918"]
}
```

```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "type": "https://code.dcycle.io/api-reference/errors#NOT_FOUND",
  "title": "Not Found",
  "status": 404,
  "code": "NOT_FOUND",
  "detail": "EmployeeHistoric with id='9f8e7d6c-5b4a-4392-8f1e-0d9c8b7a6f5e' not found",
  "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"
}
```

## Request

### Headers

**x-api-key** `string` *required*

Your API key (see [Authentication](https://code.dcycle.io/api-reference/introduction.md#authentication)).

**x-organization-id** `string` *required*

Your organization. The responses of its employees, and of those of the organizations under it (its
[perimeter](https://code.dcycle.io/api-reference/ingest-jobs/overview.md#perimeter)), can be read.

### Path Parameters

**response\_id** `uuid` *required*

The response: the `entity_id` of its create job's item, or the `id` of any of its periods (see
[List Commuting Periods](https://code.dcycle.io/api-reference/employees/commuting-periods/list.md)): either answers the whole response. A
response stored before the survey grouped them is keyed by its only period.

## Response

`200 OK` with the response:

| Field | Description |
| - | - |
| `id` | The response. |
| `employee_id` | The employee who answered; `null` for an answer to an anonymous survey (`is_anonymous: true`). |
| `start_date`, `end_date` | Its period. |
| `situation` | `active`, `inactive` or `terminated` in the period. |
| `response_medium` | Where it came from: `manual` (this API, the app or a file), `form` (the emailed survey) or `qr` (the survey's QR code or shared link). |
| `modes` | One `in_person` mode per transport, then the `telecommuting` one, with the fields of a record's modes and the `period_id` that holds each. The days at home are stored on the first transport's period, so its `period_id` repeats. A response stored before today's rules may not follow them (a day in two modes, several periods at home): read it as it is. |
| `custom_responses` | The answers to your organization's own survey questions, by question key (`{}` when none), with the computed value of each formula column. |
| `period_ids` | Its commuting periods, one per transport, oldest first. |

## Errors

[Problem details](https://code.dcycle.io/api-reference/errors.md): `404 NOT_FOUND` when the response does not exist, has no period left, or
its employee is outside your organization's [perimeter](https://code.dcycle.io/api-reference/ingest-jobs/overview.md#perimeter) (all answer
the same); `401` for a missing or invalid API key, `403 LOGGED_USER_NOT_MEMBER` when the key's user is not a member of
the organization, and `429` beyond the [rate limits](https://code.dcycle.io/api-reference/rate-limits.md).

## Related Endpoints

> [card] [Replace Commuting Response (v2)](https://code.dcycle.io/api-reference/employees/commuting-response-replace-v2.md)
>
> Write the response again whole

> [card] [Create Commuting Periods (v2)](https://code.dcycle.io/api-reference/employees/commuting-create-v2.md)
>
> Create responses

> [card] [Delete Commuting Periods (v2)](https://code.dcycle.io/api-reference/employees/commuting-delete-v2.md)
>
> Delete whole responses

> [card] [List Job Items](https://code.dcycle.io/api-reference/ingest-jobs/list-items.md)
>
> The response id of each record


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