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}"
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"])
{
"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"]
}
{
"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"
}
Get Commuting Response (v2)
Read one commuting response: its period, its modes and the answers to your own survey questions
GET
/
v2
/
employees
/
commuting
/
responses
/
{response_id}
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}"
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"])
{
"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"]
}
{
"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"
}
← Employees API
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) 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. To change it, send it whole to
Replace Commuting Response (v2).
Beta. Part of the bulk ingest API, in beta. The contract may still change before general availability.
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}"
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"])
{
"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"]
}
{
"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
string
required
Your API key (see Authentication).
string
required
Your organization. The responses of its employees, and of those of the organizations under it (its
perimeter), can be read.
Path Parameters
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): 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:404 NOT_FOUND when the response does not exist, has no period left, or
its employee is outside your organization’s 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.
Related Endpoints
Replace Commuting Response (v2)
Write the response again whole
Create Commuting Periods (v2)
Create responses
Delete Commuting Periods (v2)
Delete whole responses
List Job Items
The response id of each record
Was this page helpful?