Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Get Surveys - GET /attributes - http://api.spectrumsurveys.com/suppliers/v2/attributes/:qualification_code?survey_localization=:survey_localization

...

Call this API to view the respondent's question text, condition codes, and condition code texts for unfamiliar qualification codes/condition codes.  Survey_localization is a required Query String parameter.

...

  • Qualifications are shared across surveyLocalizations on PureSpectrum.  For example, we use the same code for b2b employment in the US/English, that we use in Japanese Japan.
  • Condition codes when appropriate are also shared across localizations
  • Even though the codes may be the same, we represent these questions/answers using the appropriate language/localization
  • We only currently support 3 question types in this api call: Singlepunch, Singlepunch-alt, & Multipunch
    • singlepunch is presented as a dropdown.  Singlepunch-alt and Multipunch are shown in push-button form

HEADER Parameters


Parameter

Type

Required

Description

access-token

string

Yes

Token used to identify the authenticity of the user.


Query String Parameters


Parameter

Type

Required

Description

survey_localization

string

Yes

Define the Country & Language combination for which you need the attribute's question/answer text returned


Response Parameters    



Parameter

Type

Description

q_text

string

The text of the question asked to the respondent

q_descstringA description of the question that is asked of the respondent
q_catstringCategory name of the question that is asked of the respondent

q_type

integer

1=singlepunch (only one selection is allowed, presented in dropdown form)

2=singlepunch-alt (only one selection is allowed - presented in push button form)

3=multipunch (multiple selections are allowed, presented in push button form)

4=range (not currently supported)


q_classinteger

1 = Core profiling question

2 = Extended profiling question

3 = Custom profiling question

conditionsarray of objects

contains the condition codes and condition code texts

c_idstring

the condition code of the corresponding text. This will match the requisite condition codes in a survey's qualifications/quotas

c_textstringThe text of the answer presented to the respondent

...

Code Block
GET /suppliers/v2/attributes/1031?survey_localization=en_US
Host: api.spectrumsurveys.com
access-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Sample API Response


Example 1: Simple MultiPunch

Code Block
{
  "q_text":"Which of the following pets do you own?",
  "q_cat":"Pets",
  "q_desc":"Pet Ownership",
  "q_type":3,
  "q_class":2,
  "conditions":[
	{"c_id":"111","c_text":"Dog"},
	{"c_id":"112","c_text":"Cat"},
	{"c_id":"113","c_text":"Rabbit"},
	{"c_id":"114","c_text":"Snake/Lizard"},
	{"c_id":"115","c_text":"Fish"},
	{"c_id":"116","c_text":"Small Birds"},
	{"c_id":"117","c_text":"Large Birds"},
	{"c_id":"118","c_text":"Horse/Equine"},
	{"c_id":"119","c_text":"Ferrets"},
	{"c_id":"120","c_text":"Hamster or other Rodent"},
	{"c_id":"121","c_text":"Turtle"},
	{"c_id":"122","c_text":"Exotic Pets"},
	{"c_id":"999","c_text":"None of the Above"}
  ]
}


Example 2: Singlepunch - in context dropdown

Code Block
{
  "q_text":"The company I work for employs approximately %1034% people",
  "q_cat":"B2B",
  "q_desc":"Company Size (Employees)",
  "q_type":1,
  "q_class":2,
  "conditions":[
	{"c_id":"111","c_text":"1 to 5"},
	{"c_id":"112","c_text":"6 to 9"},
	{"c_id":"113","c_text":"10 to 19"},
	{"c_id":"114","c_text":"20 to 24"},
	...
	{"c_id":"125","c_text":"50,000+"},
	{"c_id":"999","c_text":"Don't know"}
  ]
}


Example 3: Singlepunch - alt

Code Block
{
  "q_text":"Are you registered in any of the following US political parties?",
  "q_cat":"Politics",
  "q_desc":"Political Party Affiliation",
  "q_type":1,
  "q_class":2,
  "conditions":[
	{"c_id":"111","c_text":"Democratic Party"},
	{"c_id":"112","c_text":"Republican Party"},
	{"c_id":"113","c_text":"Independent"},
	{"c_id":"114","c_text":"Constitution Party"},
	...
	{"c_id":"117","c_text":"Other"},
	{"c_id":"118","c_text":"I am not registered with a political party"}
  ]
}