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.

get
Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Path parameters
idstring · uuidRequired

A UUID string identifying this Survey.

Responses
200Success
application/json
get
/v4/survey/survey/{id}/
GET /v4/survey/survey/{id}/ HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "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.

get
Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Path parameters
idstring · uuidRequired

A UUID string identifying this Survey.

Query parameters
ref_idstringRequired
Responses
200Success
application/json
get
/v4/survey/survey/{id}/answer/
GET /v4/survey/survey/{id}/answer/?ref_id=text HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "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.

post
Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Path parameters
idstring · uuidRequired

A UUID string identifying this Survey.

Body

Survey response with metadata and derived values.

dataobjectRequired

A JSON object containing survey data.

is_completebooleanRequired
reference_idstring · min: 1 · max: 255Required
Responses
200Success
application/json
post
/v4/survey/survey/{id}/answer/
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"
}
200Success
{
  "isComplete": true,
  "detail": "text"
}

Get Survey Themes

You can retrieve common survey themes using the v4/survey/survey/themes endpoint.

get

Retrieve common themes for surveys.

Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Query parameters
defaultbooleanOptional
Responses
200Success
application/json
get
/v4/survey/survey/themes/
GET /v4/survey/survey/themes/ HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "data": {}
}

Was this helpful?