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.
Read-only public view of a survey.
draft- Draft Surveyarchived- Archived Surveypublished- Published Survey
nps- NPSsmart_survey- Smart Survey
Public URL to vote on the survey. Backend is responsible for replacing the ref_id.
GET /v4/survey/survey/{id}/ HTTP/1.1
Authorization: Parcellab-API-Token YOUR_BASE64_ENCODED_API_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.
Read-only public view of a survey.
draft- Draft Surveyarchived- Archived Surveypublished- Published Survey
nps- NPSsmart_survey- Smart Survey
Public URL to vote on the survey. Backend is responsible for replacing the ref_id.
GET /v4/survey/survey/{id}/answer/?ref_id=text HTTP/1.1
Authorization: Parcellab-API-Token YOUR_BASE64_ENCODED_API_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 customer-submitted data.
reference_type can be provided explicitly and defaults to server-side
inference from reference_id.
A JSON object containing survey data.
tracking- Trackingreturn_registration- Return registration
Envelope for survey response data returned from processing.
POST /v4/survey/survey/{id}/answer/ HTTP/1.1
Authorization: Parcellab-API-Token YOUR_BASE64_ENCODED_API_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.
Theming configuration applied to survey UI.
A json object containing the survey theme.
GET /v4/survey/survey/themes/ HTTP/1.1
Authorization: Parcellab-API-Token YOUR_BASE64_ENCODED_API_TOKEN
Accept: */*
{
"data": {}
}Last updated
Was this helpful?