SurveyQuestion Returned Fields v5

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

FieldDescriptionFormat
idQuestion IDnumber
base_typeType of Objectstring
typetextbox, essay, multi_textbox, radio, checkbox, menu, slider, multi_slider, image_select, nps, table, rank, cont_sum, file, matrix, group, urlredirect, hidden, email, instructionsstring
titleQuestion title textstring
shortnameShort name textstring
varnameSPSS variable name textstring
descriptionQuestion Descriptionstring
has_showhide_depsIndicates whether there are questions triggered by this questionboolean
commentIndicates whether comments box is attachedboolean
propertiesQuestion Properties (see Properties Fields below)string
Properties FieldsDescriptionFormat
optionsArray of answer options. See SurveyOption Returned Fields for more info.array
sub_questionsArray of sub-questions (i.e. row headers)number
option_sortAnswer option randomizationboolean
requiredRequired settingboolean
hiddenHidden by default settingboolean
orientationOrientation of labels: VERT is default, HORZ if set to horizontal, STACKED for likert scale.string
labels_rightLabel placementboolean
map_keytext, 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, instructionsstring
question_descriptionArray of question description textstring
question_description_aboveDisplay of question description text, true if above question titleboolean
soft-requiredSoft-required settingboolean
disabledDisabled settingboolean
messagesArray of question messages (see Messages Fields below)string
hide_after_responseHide after answering settingboolean
custom_cssCSS template hook appliedstring
placeholderarray of Question Placeholder text (open text questions)array
exclude_numberSkip question numberboolean
show_rulesArray of show/when logic rulesarray
min_numberMinimum value validation for Number, Slider, Continuous Sum>string
max_numberMaximum value validation for Number, Slider, Continuous Sumstring
minimum_responseMinimum answers required. Applies to Checkbox, Image Choice Multi, List of Textboxes, Slider Multi, Drag&Drop Rank, Table Rank, Table questionsnumber
min_answers_per_rowMinimum answers required per row for Star rank, Table questionsstring
force_numericNumber validationboolean
force_percentPercent validationboolean
force_currencyCurrency validationboolean
subtypedate, email validationstring
only_whole_numForce whole number validationboolean
limitsAnswer options for table of dropdownsstring/number
Continuous Sum PropertiesDescriptionFormat
max_totalMax total value for continuous sum questionsstring
must_be_maxForce max total validation for continuous sum questionsboolean
max_total_noshowHide max total validation for continuous sum questionsboolean
File Upload PropertiesDescriptionFormat
sizelimitFile upload size limitnumber
extensionsFile upload allowed file extensionsstring
maxfilesFile upload max filesstring
URL Redirect PropertiesDescriptionFormat
urlRedirect URL for url redirectURL
fieldnameField name for field passed in url redirectstring
mappingQuestion ID for field passed in url redirectstring
defaultDefault value for for field passed in url redirectstring
Result Chart PropertiesDescriptionFormat
show_titleIndicates whether title is shown for Result Chartboolean
Messages FieldsDescriptionFormat
inputmaskActual RegEx pattern if usedstring
r_extreme_labelRight extreme label in Likertstring
l_extreme_labelLeft extreme label in Likertstring
center_labelCenter label text for Sliderstring
right_labelRight label text for Sliderstring
left_labelLeft label text for Sliderstring
conjoint_best_labelConjoint question 'Best' textstring
conjoint_worst_labelConjoint question 'Worst' textstring
conjoint_none_labelConjoint question 'None' textstring
conjoint_card_labelConjoint question 'Card' textstring
conjoint_error_labelConjoint question 'Error' textstring
maxdiff_best_labelMax Diff question 'Best' textstring
maxdiff_worst_labelMax Diff question 'Worst' textstring
maxdiff_attribute_labelMax Diff question 'Item' textstring

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 fieldValueDescription
atom => type3Previous Question
atom => type15Time Taken on survey (in seconds)
atom => type6Current Date
atom => type21Is Mobile (true/false)
atom => type5IP Address
atom => type8Country
atom => type9Region
atom => type19Postal Code
atom => type10City
atom => type13Email Invite Data
atom => value[Any Number]Question ID 
operator4is exactly equal to
operator22is not exactly equal to
operator12is one of the following answers
operator5is not of the following answers
operator20is answered
operator21is not answered
operator6> (greater than)
operator7≥ (greater than or equal to)
operator9< (less than)
operator8≤ (less than or equal to)
operator23Date after or equal to
operator24Date before or equal to
operator14matches regex pattern
operator15does not match pattern
operator26is true
operator27is false
atom2 => type17list of answer options
atom2 => type2open text
atom2 => value[Any Number]-[Any Number]Question ID-Option SKU


Example Returns (.debug format)

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
)