Surveys
Our API allows you to retrieve key survey information and submit responses for your surveys.
Overview
These requests allow you to get survey data, including answers and common themes, as well as submitting survey responses with a single HTTPS request.
You can retrieve surveys and answers through these APIs using a unique identifier in order to evaluate your completed surveys. Additionally, you can monitor common topics in your surveys and submit survey answers.
Get Surveys
You can retrieve surveys using the v4/survey/survey/{id} endpoint.
Send Authorization: Parcellab-API-Token <encoded-token>.
<encoded-token> = base64(account_id:token) as provided in the portal.
A UUID string identifying this Survey.
GET /v4/survey/survey/{id}/ HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"emailPreviewCdn": "text",
"config": {},
"name": "text",
"status": "draft",
"archived": true,
"type": "nps",
"surveyUrl": "text",
"isEditable": true
}Get Survey Answers
You can retrieve survey answers using the v4/survey/survey/{id}/answer endpoint.
Send Authorization: Parcellab-API-Token <encoded-token>.
<encoded-token> = base64(account_id:token) as provided in the portal.
A UUID string identifying this Survey.
GET /v4/survey/survey/{id}/answer/?ref_id=text HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"emailPreviewCdn": "text",
"config": {},
"name": "text",
"status": "draft",
"archived": true,
"type": "nps",
"surveyUrl": "text",
"isEditable": true
}Submit Survey Answers
You can submit survey answers using the v4/survey/survey/{id}/answer endpoint.
Send Authorization: Parcellab-API-Token <encoded-token>.
<encoded-token> = base64(account_id:token) as provided in the portal.
A UUID string identifying this Survey.
Survey response with metadata and derived values.
A JSON object containing survey data.
POST /v4/survey/survey/{id}/answer/ HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"data": {
"key": "value"
},
"is_complete": true,
"reference_id": "some_reference_id"
}{
"isComplete": true,
"detail": "text"
}Get Survey Themes
You can retrieve common survey themes using the v4/survey/survey/themes endpoint.
Retrieve common themes for surveys.
Send Authorization: Parcellab-API-Token <encoded-token>.
<encoded-token> = base64(account_id:token) as provided in the portal.
GET /v4/survey/survey/themes/ HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {}
}Was this helpful?