Get questionnaire by ID
Returns a single questionnaire by id. Authentication is optional for this read; if provided, the token is validated and may affect fields visible to the caller.
Path Parameters
Questionnaire id.
^[a-fA-F0-9]{24}$Header Parameters
The ID of the organization making the request.
Response Body
application/json
Questionnaire response.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Provided authentication token is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Questionnaire was not found.
TypeScript Definitions
Use the response body type in TypeScript.
curl -X GET "https://example.com/questionnaires/65d4f20f8f5a4d7e9a123456" \ -H "X-Organization-Id: org_123"{
"_id": "65d4f20f8f5a4d7e9a123456",
"name": "string",
"description": "string",
"organization": "65d4f20f8f5a4d7e9a123456",
"election": "string",
"visibility": "public",
"contentType": "questionnaire",
"includeDefaultQuestions": true,
"questions": [
{
"_id": "65d4f20f8f5a4d7e9a123456",
"title": "string",
"description": "string",
"type": "text-long",
"options": [
"string"
],
"required": true,
"wordCountMax": 0,
"visibility": "public",
"archived": false,
"default": false,
"internalFieldId": "email",
"mapsToField": "phone"
}
],
"createdByUser": "65d4f20f8f5a4d7e9a123456",
"recentActivity": [
{
"user": "65d4f20f8f5a4d7e9a123456",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"races": [
"65d4f20f8f5a4d7e9a123456"
],
"statusByCandidate": [
{
"candidate": "65d4f20f8f5a4d7e9a123456",
"race": "65d4f20f8f5a4d7e9a123456",
"status": "not-started"
}
],
"analytics": {
"numberCandidates": 0,
"numberRaces": 0,
"numberCandidatesNotStarted": 0,
"numberCandidatesInProgress": 0,
"numberCandidatesCompleted": 0,
"numberCandidatesPublished": 0,
"numberCandidatesSubmitted": 0
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}Find questionnaires
Returns paginated questionnaires. Anonymous callers may find questionnaires for a specific `race` and `organization`. Other external callers must authenticate; organization-scoped queries require voter guide permissions for that organization unless the caller has Branch admin/editor permissions.
Find races
Returns paginated races. Core race reads require an organization overlay context supplied by `overlayOrganizationId` or the `X-Organization-Id` header. When `$search` is supplied, `election` is required.
