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

Field Description Format
id Question ID number
_type API object type string
_subtype 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
has_showhide_deps Indicates whether there are questions triggered by this question boolean
comment Indicates whether comments box is attached boolean
options Array of answer options/row headers. See SurveyOption Returned Fields for more info. array
sub_question_skus Option skus for subquestions (Applies to table, matrix and group question types) number
Properties Fields Description Format
option_sort Answer option randomization boolean
required Required setting boolean
soft-required Soft-required setting boolean
hidden Hidden by default setting boolean
disabled Disabled setting 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
orientation Orientation of labels: VERT is default, HORZ if set to horizontal, STACKED for likert scale. string
labels_right Label placement boolean
question_description Question description text string
question_description_above Display of question description text, true if above question title boolean
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
hide_after_response Hide after answering setting boolean
custom_css CSS template hook applied string
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_number Force whole number validation boolean
limits Answer options for table of dropdowns limits
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 boolean
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

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 (.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
)