SurveyQuestion Returned Fields

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

Result Chart PropertiesDescriptionFormat
URL Redirect PropertiesDescriptionFormat
File Upload PropertiesDescriptionFormat
Continuous Sum PropertiesDescriptionFormat
Properties FieldsDescriptionFormat
FieldDescriptionFormat
idQuestion IDnumber
_typeAPI object typestring
_subtypetextbox, 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
has_showhide_depsIndicates whether there are questions triggered by this questionboolean
commentIndicates whether comments box is attachedboolean
optionsArray of answer options/row headers. See SurveyOption Returned Fields for more info.array
sub_question_skusOption skus for subquestions (Applies to table, matrix and group question types)number
option_sortAnswer option randomizationboolean
requiredRequired settingboolean
soft-requiredSoft-required settingboolean
hiddenHidden by default settingboolean
disabledDisabled settingboolean
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
orientationOrientation of labels: VERT is default, HORZ if set to horizontal, STACKED for likert scale.string
labels_rightLabel placementboolean
question_descriptionQuestion description textstring
question_description_aboveDisplay of question description text, true if above question titleboolean
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
hide_after_responseHide after answering settingboolean
custom_cssCSS template hook appliedstring
exclude_numberSkip question numberboolean
show_rulesArray of show/when logic rulesarray
min_numberMinimum value validation for Number, Slider, Continuous Sumstring
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_numberForce whole number validationboolean
limitsAnswer options for table of dropdownslimits
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
sizelimitFile upload size limitnumber
extensionsFile upload allowed file extensionsstring
maxfilesFile upload max filesstring
urlRedirect URL for url redirectURL
fieldnameField name for field passed in url redirectboolean
mappingQuestion ID for field passed in url redirectstring
defaultDefault value for for field passed in url redirectstring
show_titleIndicates whether title is shown for Result Chartboolean


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] => 4
    [page] => 1
    [total_pages] => 1
    [results_per_page] => 4
    [data] => Array
        (
            [0] => Array
                (
                    [id] => 2
                    [_type] => SurveyQuestion
                    [_subtype] => radio
                    [title] => Array
                        (
                            [English] => Will you attend?
                        )

                    [shortname] =>
                    [varname] =>
                    [description] => Array
                        (
                        )

                    [has_showhide_deps] => 1
                    [comment] =>
                    [properties] => Array
                        (
                            [option_sort] =>
                            [required] =>
                            [hidden] =>
                            [orientation] => VERT
                            [labels_right] => 1
                            [map_key] => radio
                            [show_title] =>
                            [question_description] => Array
                                (
                                    [English] =>
                                )

                            [question_description_above] =>
                            [soft-required] =>
                            [disabled] =>
                            [messages] => Array
                                (
                                    [inputmask] => Array
                                        (
                                        )

                                    [r_extreme_label] => Array
                                        (
                                        )

                                    [l_extreme_label] => Array
                                        (
                                        )

                                    [center_label] => Array
                                        (
                                        )

                                    [right_label] => Array
                                        (
                                        )

                                    [left_label] => Array
                                        (
                                        )

                                )

                            [hide_after_response] =>
                            [custom_css] =>
                            [break_after] =>
                            [url] => http://
                        )

                    [options] => Array
                        (
                            [0] => Array
                                (
                                    [id] => 10001
                                    [_type] => SurveyOption
                                    [title] => Array
                                        (
                                            [English] => Yes
                                        )

                                    [value] => Yes
                                    [properties] => Array
                                        (
                                            [disabled] =>
                                            [dependent] => 3,4
                                            [show_rules] =>
                                            [show_rules_logic_map] => :52294b4ac1009,52294b4ac13f1
                                        )

                                )

                            [1] => Array
                                (
                                    [id] => 10002
                                    [_type] => SurveyOption
                                    [title] => Array
                                        (
                                            [English] => No
                                        )

                                    [value] => No
                                    [properties] => Array
                                        (
                                            [disabled] =>
                                        )

                                )

                        )

                    [sub_question_skus] =>
                )

Get SurveyQuestion Return Example (.debug format):

Array
(
    [result_ok] => 1
    [data] => Array
        (
            [id] => 2
            [_type] => SurveyQuestion
            [_subtype] => radio
            [title] => Array
                (
                    [English] => Will you attend?
                )

            [shortname] =>
            [varname] =>
            [description] => Array
                (
                )

            [has_showhide_deps] => 1
            [comment] =>
            [properties] => Array
                (
                    [option_sort] =>
                    [required] =>
                    [hidden] =>
                    [orientation] => VERT
                    [labels_right] => 1
                    [map_key] => radio
                    [show_title] =>
                    [question_description] => Array
                        (
                            [English] =>
                        )

                    [question_description_above] =>
                    [soft-required] =>
                    [disabled] =>
                    [messages] => Array
                        (
                            [inputmask] => Array
                                (
                                )

                            [r_extreme_label] => Array
                                (
                                )

                            [l_extreme_label] => Array
                                (
                                )

                            [center_label] => Array
                                (
                                )

                            [right_label] => Array
                                (
                                )

                            [left_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] => 16
            [_type] => SurveyQuestion
            [_subtype] => textbox
            [title] => Array
                (
                    [English] => Please provide your email:
                )

            [shortname] =>
            [varname] =>
            [description] => Array
                (
                )

            [has_showhide_deps] =>
            [comment] =>
            [properties] => Array
                (
                    [required] =>
                    [hidden] =>
                    [subtype] => EMAIL
                    [map_key] => email
                )

            [options] => Array
                (
                )

            [sub_question_skus] =>
        )

)

Update SurveyQuestion Return Example (.debug format):

Array
(
    [result_ok] => 1
    [data] => Array
        (
            [id] => 5
            [_type] => SurveyQuestion
            [_subtype] => textbox
            [title] => Array
                (
                    [English] => Email
                )

            [shortname] =>
            [varname] =>
            [description] => Array
                (
                )

            [has_showhide_deps] =>
            [comment] =>
            [properties] => Array
                (
                    [required] =>
                    [hidden] =>
                    [map_key] => email
                    [show_title] =>
                    [question_description] => Array
                        (
                            [English] =>
                        )

                    [question_description_above] =>
                    [soft-required] =>
                    [disabled] =>
                    [messages] => Array
                        (
                            [inputmask] => Array
                                (
                                )

                            [r_extreme_label] => Array
                                (
                                )

                            [l_extreme_label] => Array
                                (
                                )

                            [center_label] => Array
                                (
                                )

                            [right_label] => Array
                                (
                                )

                            [left_label] => Array
                                (
                                )

                        )

                    [labels_right] =>
                    [subtype] => EMAIL
                    [hide_after_response] =>
                    [custom_css] =>
                    [break_after] =>
                    [url] => http://
                )

            [options] => Array
                (
                )

            [sub_question_skus] =>
        )

)

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.