Queue Pending Mobility Survey Export
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/employees/pending-survey/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/employees/pending-survey/download"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v2/employees/pending-survey/download \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"processing_job_id": "<string>"
}Queue Pending Mobility Survey Export
Queue an async Excel export of employees pending a mobility survey response across a holding’s whole organization tree
GET
/
v2
/
employees
/
pending-survey
/
download
Queue Pending Mobility Survey Export
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/employees/pending-survey/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/employees/pending-survey/download"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v2/employees/pending-survey/download \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"processing_job_id": "<string>"
}← Employees API
Queues an asynchronous export listing every employee who has not yet responded to a mobility survey, across the header organization plus every accepted, enabled descendant in its organization tree (recursively). Intended for a holding organization checking on outstanding responses across all of its subsidiaries at once — the group scope is always applied and cannot be narrowed to a single organization.
Each row is a person: the employee records of an organization that share an email (case-insensitively) are one person, so someone uploaded again for a new survey appears once and counts as responded when any of their records responded. “Pending” is judged per survey period: an enabled employee is pending when none of their responses overlaps the period, even if they answered a previous period. A response that started earlier and still covers the period (for example a manual one from 2020 to 2026) counts as a response. Pass the period with
The completed workbook has a sheet per survey period, named after its year (
Column headers and the worksheet name are localized to the requesting user’s stored language (Spanish or English currently; Spanish is the fallback).
start_date/end_date; when omitted, the calendar year of the group’s latest survey-form response is used, by its start date (for example, a latest response starting on 2025-12-29 means 2025-01-01 to 2025-12-31). Only when the group has no survey response at all does the export fall back to employees with status = loading. Employees without an email are excluded, since there is no way to follow up with them.
Survey sendings are not recorded, so a person who did not respond is left out when they were most likely never asked about the period:
- Left before the period: their latest response marked
terminatedended beforestart_date, and no other response starts after it (someone rehired is surveyed again). Appearing in a list uploaded after leaving does not count as coming back. - Uploaded for another period: they were first uploaded after
end_date, in a list (the organization’s employees created that day) that was answered by survey for other periods only. A list uploaded after the period that nobody has answered yet keeps its people, since surveying a past period afterwards is common.
include_responded, everyone who responded is listed.
This endpoint only enqueues the export — it creates a PENDING processing job, fires an event for a background worker to build the .xlsx and upload it, and returns immediately with processing_job_id. Poll the processing job (or wait for the in-app notification / email) to retrieve the download link once it completes. The file has an Estado / Status column (pending or responded), the date of the person’s latest survey sending and a Periodo evaluado / Period checked column with the period the status was judged on. If there are no employees to list, the export still completes with a file containing just the header row.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
UUID of the holding (or any) organization. The export always spans this organization plus its whole descendant tree.Example:
a8315ef3-dd50-43f8-b7ce-d839e68d51faQuery Parameters
string
Survey period start date (
YYYY-MM-DD). Defaults to January 1st of the year of the group’s latest survey response.Example: 2025-01-01string
Survey period end date (
YYYY-MM-DD). Omit for an open-ended period. Ignored without start_date: the default period then ends on December 31st of its year.Example: 2025-12-31boolean
default:"false"
List every employee of the group, not only the pending ones. The
Estado / Status column then marks each one as pending or responded for the period.Response
string
UUID of the created processing job. Poll
GET /processing_jobs/{processing_job_id}/download-url until the job completes to retrieve a presigned download URL for the .xlsx file.Pendientes 2025 / Pending 2025, or Estado encuestas 2025 / Survey status 2025 with include_responded). A period of up to a year is one sheet (a July-June period is named 2024-2025); a longer one is split into 12-month periods from start_date, latest first (a January 1st start gives calendar years, a July 1st start July-June years), so a person who missed two years’ surveys appears on both sheets. Without end_date the sheets run up to the 12-month period that contains today. When the group has no survey response at all (the status = loading fallback), the single sheet has no year in its name. Each sheet has the columns:
| Column | Description |
|---|---|
| Employee’s email address | |
| Name | Employee’s name |
| Organization | Name of the organization (within the tree) the employee belongs to |
| Survey sent date | Date of the person’s latest employee record (date only, no time) |
| Status | Pending, or Responded with include_responded |
| Period checked | The period the status was judged on |
Example
curl -X GET "https://api.dcycle.io/v2/employees/pending-survey/download" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
response = requests.get(
"https://api.dcycle.io/v2/employees/pending-survey/download",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
},
)
processing_job_id = response.json()["processing_job_id"]
print(f"Queued export: {processing_job_id}")
const axios = require('axios');
axios.get('https://api.dcycle.io/v2/employees/pending-survey/download', {
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
})
.then(({ data }) => {
console.log(`Queued export: ${data.processing_job_id}`);
});
Successful Response
{
"processing_job_id": "550e8400-e29b-41d4-a716-446655440000"
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}
403 Forbidden
Cause: The authenticated user is not a member of the organization{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}
404 Not Found
Cause: Organization not found{"code": "ORGANIZATION_NOT_FOUND", "detail": "Organization with id=UUID('...') not found"}
Related Endpoints
List Employees (V2)
List employees with group-view filtering, including by status
Bulk Delete by Filters
Bulk-delete employees matching the same group-view filters
Was this page helpful?