Returned fields for the SurveyQuestion sub-object are explained below. Go to the Example Returns section to view return examples for each call type.
Returned Fields for the SurveyQuestion Object
Field | Description | Format |
---|---|---|
id | Question ID | number |
base_type | Type of Object | string |
type | textbox, essay, multi_textbox, radio, checkbox, menu, slider, multi_slider, image_select, NPS®, table, rank, cont_sum, file, matrix, group, urlredirect, hidden, email, instructions | string |
title | Question title text | string |
shortname | Short name text | string |
varname | SPSS variable name text | string |
description | Question Description | string |
has_showhide_deps | Indicates whether there are questions triggered by this question | boolean |
comment | Indicates whether comments box is attached | boolean |
properties | Question Properties (see Properties Fields below) | string |
Properties Fields | Description | Format |
options | Array of answer options. See SurveyOption Returned Fields for more info. | array |
sub_questions | Array of sub-questions (i.e. row headers) | number |
option_sort | Answer option randomization | string |
required | Required setting | boolean |
hidden | Hidden by default setting | boolean |
orientation | Orientation of labels: VERT is default, HORZ if set to horizontal, STACKED for likert scale. | string |
labels_right | Label placement | boolean |
map_key | text, number, email, percent, date, essay, multitext, radio, checkbox, menu, slider, multi_slider, single-image, multi-image, table-menu, radio-NPS®, radio-likert, rank-dragdrop, rank-table, contsum, table-stars, table-radio, table-checkbox, table-menu-matrix, table-textbox, matrix, group, contactgroup, file, urlredirect, hidden, emailaction, instructions | string |
question_description | Array of question description text | string |
question_description_above | Display of question description text, true if above question title | boolean |
soft-required | Soft-required setting | boolean |
disabled | Disabled setting | boolean |
messages | Array of question messages (see Messages Fields below) | string |
hide_after_response | Hide after answering setting | boolean |
custom_css | CSS template hook applied | string |
placeholder | array of Question Placeholder text (open text questions) | array |
exclude_number | Skip question number | boolean |
show_rules | Array of show/when logic rules | array |
min_number | Minimum value validation for Number, Slider, Continuous Sum> | string |
max_number | Maximum value validation for Number, Slider, Continuous Sum | string |
minimum_response | Minimum answers required. Applies to Checkbox, Image Choice Multi, List of Textboxes, Slider Multi, Drag&Drop Rank, Table Rank, Table questions | number |
min_answers_per_row | Minimum answers required per row for Star rank, Table questions | string |
force_numeric | Number validation | boolean |
force_percent | Percent validation | boolean |
force_currency | Currency validation | boolean |
subtype | date, email validation | string |
only_whole_num | Force whole number validation | boolean |
limits | Answer options for table of dropdowns | string/number |
Continuous Sum Properties | Description | Format |
max_total | Max total value for continuous sum questions | string |
must_be_max | Force max total validation for continuous sum questions | boolean |
max_total_noshow | Hide max total validation for continuous sum questions | boolean |
File Upload Properties | Description | Format |
sizelimit | File upload size limit | number |
extensions | File upload allowed file extensions | string |
maxfiles | File upload max files | string |
URL Redirect Properties | Description | Format |
url | Redirect URL for url redirect | URL |
fieldname | Field name for field passed in url redirect | string |
mapping | Question ID for field passed in url redirect | string |
default | Default value for for field passed in url redirect | string |
Result Chart Properties | Description | Format |
show_title | Indicates whether title is shown for Result Chart | boolean |
Messages Fields | Description | Format |
inputmask | Actual RegEx pattern if used | string |
r_extreme_label | Right extreme label in Likert | string |
l_extreme_label | Left extreme label in Likert | string |
center_label | Center label text for Slider | string |
right_label | Right label text for Slider | string |
left_label | Left label text for Slider | string |
conjoint_best_label | Conjoint question 'Best' text | string |
conjoint_worst_label | Conjoint question 'Worst' text | string |
conjoint_none_label | Conjoint question 'None' text | string |
conjoint_card_label | Conjoint question 'Card' text | string |
conjoint_error_label | Conjoint question 'Error' text | string |
maxdiff_best_label | Max Diff question 'Best' text | string |
maxdiff_worst_label | Max Diff question 'Worst' text | string |
maxdiff_attribute_label | Max Diff question 'Item' text | string |
Show_Rules
The show_rules return field describes the logic that controls the question in question. An example return for this looks like
"show_rules": { "atom": { "type": "3", "value": "2" }, "operator": "12", "atom2": { "type": "17", "value": ["2-10001"] }, "id": "55afa6be5945f", "same_page_skus": [] }
The atoms refer to the pieces of the logic builder that determine the source question for the logic and the value match of the condition that will show the question.
The possible values for these fields are:
Return field | Value | Description |
atom => type | 3 | Previous Question |
atom => type | 15 | Time Taken on survey (in seconds) |
atom => type | 6 | Current Date |
atom => type | 21 | Is Mobile (true/false) |
atom => type | 5 | IP Address |
atom => type | 8 | Country |
atom => type | 9 | Region |
atom => type | 19 | Postal Code |
atom => type | 10 | City |
atom => type | 13 | Email Invite Data |
atom => value | [Any Number] | Question ID |
operator | 4 | is exactly equal to |
operator | 22 | is not exactly equal to |
operator | 12 | is one of the following answers |
operator | 5 | is not of the following answers |
operator | 20 | is answered |
operator | 21 | is not answered |
operator | 6 | > (greater than) |
operator | 7 | ≥ (greater than or equal to) |
operator | 9 | < (less than) |
operator | 8 | ≤ (less than or equal to) |
operator | 23 | Date after or equal to |
operator | 24 | Date before or equal to |
operator | 14 | matches regex pattern |
operator | 15 | does not match pattern |
operator | 26 | is true |
operator | 27 | is false |
atom2 => type | 17 | list of answer options |
atom2 => type | 2 | open text |
atom2 => value | [Any Number]-[Any Number] | Question ID-Option SKU |
Example Returns (.debug format)
- GetList Return Example
- Get SurveyQuestion Return Example
- Create SurveyQuestion Return Example
- Update SurveyQuestion Return Example
- Delete Survey Question Return Example
GetList Return Example (.debug format):
Array
(
[result_ok] => 1
[total_count] => 73
[page] => 1
[total_pages] => 1
[results_per_page] => 73
[data] => Array
(
[0] => Array
(
[id] => 2
[base_type] => Question
[type] => RADIO
[title] => Array
(
[English] => Will You Attend the Event?
)
[shortname] =>
[varname] => Array
(
)
[description] => Array
(
)
[has_showhide_deps] =>
[comment] =>
[properties] => Array
(
[option_sort] =>
[required] => 1
[hidden] =>
[orientation] => VERT
[labels_right] => 1
[map_key] => radio
[show_title] =>
[question_description] => Array
(
[English] =>
)
[question_description_above] =>
[disabled] =>
[messages] => Array
(
[inputmask] => Array
(
)
[r_extreme_label] => Array
(
)
[l_extreme_label] => Array
(
)
[center_label] => Array
(
)
[right_label] => Array
(
)
[left_label] => Array
(
)
[conjoint_best_label] => Array
(
)
[conjoint_worst_label] => Array
(
)
[conjoint_card_label] => Array
(
)
[maxdiff_best_label] => Array
(
)
[maxdiff_worst_label] => Array
(
)
[maxdiff_attribute_label] => Array
(
)
[conjoint_error_label] => Array
(
)
[maxdiff_of] => Array
(
)
[maxdiff_sets_message] => Array
(
)
[na_text] => Array
(
)
[conjoint_none_label] => Array
(
)
)
[hide_after_response] =>
[custom_css] =>
[break_after] =>
[url] => http://
)
[options] => Array
(
[0] => Array
(
[id] => 10001
[title] => Array
(
[English] => Yes
)
[value] => Yes
[properties] => Array
(
[explorer_color] => 40A2C1
[disabled] =>
)
)
[1] => Array
(
[id] => 10002
[title] => Array
(
[English] => No
)
[value] => No
[properties] => Array
(
[explorer_color] => 94C826
[disabled] =>
)
)
[2] => Array
(
[id] => 10003
[title] => Array
(
[English] => Maybe
)
[value] => Maybe
[properties] => Array
(
[explorer_color] => F5A417
[disabled] =>
)
)
)
)
)
)
Get SurveyQuestion Return Example (.debug format):
Array
(
[result_ok] => 1
[data] => Array
(
[id] => 2
[base_type] => Question
[type] => RADIO
[title] => Array
(
[English] => Will You Attend the Event?
)
[shortname] =>
[varname] => Array
(
)
[description] => Array
(
)
[has_showhide_deps] =>
[comment] =>
[properties] => Array
(
[option_sort] =>
[required] => 1
[hidden] =>
[orientation] => VERT
[labels_right] => 1
[map_key] => radio
[show_title] =>
[question_description] => Array
(
[English] =>
)
[question_description_above] =>
[disabled] =>
[messages] => Array
(
[inputmask] => Array
(
)
[r_extreme_label] => Array
(
)
[l_extreme_label] => Array
(
)
[center_label] => Array
(
)
[right_label] => Array
(
)
[left_label] => Array
(
)
[conjoint_best_label] => Array
(
)
[conjoint_worst_label] => Array
(
)
[conjoint_card_label] => Array
(
)
[maxdiff_best_label] => Array
(
)
[maxdiff_worst_label] => Array
(
)
[maxdiff_attribute_label] => Array
(
)
[conjoint_error_label] => Array
(
)
[maxdiff_of] => Array
(
)
[maxdiff_sets_message] => Array
(
)
[na_text] => Array
(
)
[conjoint_none_label] => Array
(
)
)
[hide_after_response] =>
[custom_css] =>
[break_after] =>
[url] => http://
)
[options] => Array
(
The remainder of the surveyquestion get object return is an array of options. See the surveyoption object for more.
Create SurveyQuestion Return Example (.debug format):
Array
(
[result_ok] => 1
[data] => Array
(
[id] => 80
[base_type] => Question
[type] => RADIO
[title] => Array
(
[English] => New Radio Buttons Question
)
[shortname] =>
[varname] => Array
(
)
[description] => Array
(
)
[has_showhide_deps] =>
[comment] =>
[properties] => Array
(
[option_sort] =>
[required] =>
[hidden] =>
[orientation] => VERT
[labels_right] => 1
[map_key] => radio
)
[options] => Array
(
)
)
)
Update SurveyQuestion Return Example (.debug format):
Array
(
[result_ok] => 1
[data] => Array
(
[id] => 80
[base_type] => Question
[type] => RADIO
[title] => Array
(
[English] => What is your favorite color?
)
[shortname] =>
[varname] => Array
(
)
[description] => Array
(
)
[has_showhide_deps] =>
[comment] =>
[properties] => Array
(
[option_sort] =>
[required] => 1
[hidden] =>
[orientation] => VERT
[labels_right] => 1
[map_key] => radio
)
[options] => Array
(
)
)
)
Delete SurveyQuestion Return Example (.debug format):
(
[result_ok] => 1
)
Net Promoter®, NPS®, NPS Prism®, and the NPS-related emoticons are registered trademarks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld. Net Promoter Score℠ and Net Promoter System℠ are service marks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld.