VoterGuideOS
API Specificationsquestionnaire-responses

Get questionnaire-response by ID

Returns a single questionnaire response by id. Authentication is optional for this read; when `$includeQuestionnaire=true`, the response embeds the questionnaire object after applying the caller's visibility.

GET
/questionnaire-responses/{id}

Path Parameters

id*string

Questionnaire response id.

Match^[a-fA-F0-9]{24}$

Query Parameters

$includeQuestionnaire?boolean

When true, embeds the questionnaire object in the response.

Header Parameters

X-Organization-Id*string

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 response was not found.

TypeScript Definitions

Use the response body type in TypeScript.

curl -X GET "https://example.com/questionnaire-responses/65d4f20f8f5a4d7e9a123456" \  -H "X-Organization-Id: org_123"
{
  "_id": "65d4f20f8f5a4d7e9a123456",
  "questionnaire": "65d4f20f8f5a4d7e9a123456",
  "organization": "65d4f20f8f5a4d7e9a123456",
  "candidate": "65d4f20f8f5a4d7e9a123456",
  "responses": [
    {
      "question": "65d4f20f8f5a4d7e9a123456",
      "response": "string"
    }
  ],
  "originalResponses": [
    {
      "question": "65d4f20f8f5a4d7e9a123456",
      "response": "string"
    }
  ],
  "status": "started",
  "source": "candidate",
  "errorNotes": "string",
  "submittedAt": "2019-08-24T14:15:22Z",
  "publishedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}