blob: ffc6f196f8009abf097c18f11b8a94027f7c5419 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="consumersurveys_v2.html">Consumer Surveys API</a> . <a href="consumersurveys_v2.surveys.html">surveys</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070078 <code><a href="#delete">delete(surveyUrlId)</a></code></p>
79<p class="firstline">Removes a survey from view in all user GET requests.</p>
80<p class="toc_element">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070081 <code><a href="#get">get(surveyUrlId)</a></code></p>
82<p class="firstline">Retrieves information about the specified survey.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(body)</a></code></p>
85<p class="firstline">Creates a survey.</p>
86<p class="toc_element">
87 <code><a href="#list">list(startIndex=None, maxResults=None, token=None)</a></code></p>
88<p class="firstline">Lists the surveys owned by the authenticated user.</p>
89<p class="toc_element">
90 <code><a href="#start">start(resourceId, body)</a></code></p>
91<p class="firstline">Begins running a survey.</p>
92<p class="toc_element">
93 <code><a href="#stop">stop(resourceId)</a></code></p>
94<p class="firstline">Stops a running survey.</p>
95<p class="toc_element">
96 <code><a href="#update">update(surveyUrlId, body)</a></code></p>
97<p class="firstline">Updates a survey. Currently the only property that can be updated is the owners property.</p>
98<h3>Method Details</h3>
99<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700100 <code class="details" id="delete">delete(surveyUrlId)</code>
101 <pre>Removes a survey from view in all user GET requests.
102
103Args:
104 surveyUrlId: string, External URL ID for the survey. (required)
105
106Returns:
107 An object of the form:
108
109 {
110 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
111 }</pre>
112</div>
113
114<div class="method">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700115 <code class="details" id="get">get(surveyUrlId)</code>
116 <pre>Retrieves information about the specified survey.
117
118Args:
119 surveyUrlId: string, External URL ID for the survey. (required)
120
121Returns:
122 An object of the form:
123
124 { # Representation of an individual survey object.
125 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
126 "A String",
127 ],
128 "description": "A String", # Text description of the survey.
129 "title": "A String", # Optional name that will be given to the survey.
130 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700131 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700132 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
133 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700134 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700135 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
136 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
137 "A String",
138 ],
139 "populationSource": "A String", # Online population source where the respondents are sampled from.
140 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
141 "A String",
142 ],
143 "gender": "A String", # Optional gender to target.
144 },
145 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
146 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
147 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700148 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700149 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 },
151 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
152 "questions": [ # List of questions defining the survey.
153 { # Message defining the question specifications.
154 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
155 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
156 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
157 "A String",
158 ],
159 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
160 "question": "A String", # Required question text shown to the respondent.
161 "numStars": "A String", # Number of stars to use for ratings questions.
162 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
163 "videoId": "A String", # The YouTube video ID to be show in video questions.
164 "answers": [ # Required list of answer options for a question.
165 "A String",
166 ],
167 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
168 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
169 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
170 "images": [
171 { # Container object for image data and alt_text.
172 "url": "A String", # The read-only URL for the hosted images.
173 "altText": "A String", # The alt text property used in image tags is required for all images.
174 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
175 },
176 ],
177 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
178 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
179 "A String",
180 ],
181 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
182 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
183 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
184 },
185 ],
186 "wantedResponseCount": 42, # Number of responses desired for the survey.
187 }</pre>
188</div>
189
190<div class="method">
191 <code class="details" id="insert">insert(body)</code>
192 <pre>Creates a survey.
193
194Args:
195 body: object, The request body. (required)
196 The object takes the form of:
197
198{ # Representation of an individual survey object.
199 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
200 "A String",
201 ],
202 "description": "A String", # Text description of the survey.
203 "title": "A String", # Optional name that will be given to the survey.
204 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700205 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700206 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
207 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700208 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700209 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
210 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
211 "A String",
212 ],
213 "populationSource": "A String", # Online population source where the respondents are sampled from.
214 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
215 "A String",
216 ],
217 "gender": "A String", # Optional gender to target.
218 },
219 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
220 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
221 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700222 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700223 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700224 },
225 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
226 "questions": [ # List of questions defining the survey.
227 { # Message defining the question specifications.
228 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
229 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
230 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
231 "A String",
232 ],
233 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
234 "question": "A String", # Required question text shown to the respondent.
235 "numStars": "A String", # Number of stars to use for ratings questions.
236 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
237 "videoId": "A String", # The YouTube video ID to be show in video questions.
238 "answers": [ # Required list of answer options for a question.
239 "A String",
240 ],
241 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
242 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
243 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
244 "images": [
245 { # Container object for image data and alt_text.
246 "url": "A String", # The read-only URL for the hosted images.
247 "altText": "A String", # The alt text property used in image tags is required for all images.
248 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
249 },
250 ],
251 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
252 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
253 "A String",
254 ],
255 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
256 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
257 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
258 },
259 ],
260 "wantedResponseCount": 42, # Number of responses desired for the survey.
261 }
262
263
264Returns:
265 An object of the form:
266
267 { # Representation of an individual survey object.
268 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
269 "A String",
270 ],
271 "description": "A String", # Text description of the survey.
272 "title": "A String", # Optional name that will be given to the survey.
273 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700274 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700275 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
276 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700277 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700278 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
279 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
280 "A String",
281 ],
282 "populationSource": "A String", # Online population source where the respondents are sampled from.
283 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
284 "A String",
285 ],
286 "gender": "A String", # Optional gender to target.
287 },
288 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
289 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
290 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700291 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700292 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700293 },
294 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
295 "questions": [ # List of questions defining the survey.
296 { # Message defining the question specifications.
297 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
298 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
299 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
300 "A String",
301 ],
302 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
303 "question": "A String", # Required question text shown to the respondent.
304 "numStars": "A String", # Number of stars to use for ratings questions.
305 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
306 "videoId": "A String", # The YouTube video ID to be show in video questions.
307 "answers": [ # Required list of answer options for a question.
308 "A String",
309 ],
310 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
311 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
312 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
313 "images": [
314 { # Container object for image data and alt_text.
315 "url": "A String", # The read-only URL for the hosted images.
316 "altText": "A String", # The alt text property used in image tags is required for all images.
317 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
318 },
319 ],
320 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
321 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
322 "A String",
323 ],
324 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
325 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
326 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
327 },
328 ],
329 "wantedResponseCount": 42, # Number of responses desired for the survey.
330 }</pre>
331</div>
332
333<div class="method">
334 <code class="details" id="list">list(startIndex=None, maxResults=None, token=None)</code>
335 <pre>Lists the surveys owned by the authenticated user.
336
337Args:
338 startIndex: integer, A parameter
339 maxResults: integer, A parameter
340 token: string, A parameter
341
342Returns:
343 An object of the form:
344
345 {
346 "tokenPagination": {
347 "nextPageToken": "A String",
348 "previousPageToken": "A String",
349 },
350 "pageInfo": {
351 "totalResults": 42,
352 "startIndex": 42,
353 "resultPerPage": 42,
354 },
355 "resources": [ # An individual survey resource.
356 { # Representation of an individual survey object.
357 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
358 "A String",
359 ],
360 "description": "A String", # Text description of the survey.
361 "title": "A String", # Optional name that will be given to the survey.
362 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700363 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700364 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
365 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700366 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700367 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
368 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
369 "A String",
370 ],
371 "populationSource": "A String", # Online population source where the respondents are sampled from.
372 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
373 "A String",
374 ],
375 "gender": "A String", # Optional gender to target.
376 },
377 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
378 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
379 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700380 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700381 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700382 },
383 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
384 "questions": [ # List of questions defining the survey.
385 { # Message defining the question specifications.
386 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
387 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
388 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
389 "A String",
390 ],
391 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
392 "question": "A String", # Required question text shown to the respondent.
393 "numStars": "A String", # Number of stars to use for ratings questions.
394 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
395 "videoId": "A String", # The YouTube video ID to be show in video questions.
396 "answers": [ # Required list of answer options for a question.
397 "A String",
398 ],
399 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
400 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
401 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
402 "images": [
403 { # Container object for image data and alt_text.
404 "url": "A String", # The read-only URL for the hosted images.
405 "altText": "A String", # The alt text property used in image tags is required for all images.
406 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
407 },
408 ],
409 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
410 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
411 "A String",
412 ],
413 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
414 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
415 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
416 },
417 ],
418 "wantedResponseCount": 42, # Number of responses desired for the survey.
419 },
420 ],
421 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
422 }</pre>
423</div>
424
425<div class="method">
426 <code class="details" id="start">start(resourceId, body)</code>
427 <pre>Begins running a survey.
428
429Args:
430 resourceId: string, A parameter (required)
431 body: object, The request body. (required)
432 The object takes the form of:
433
434{
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700435 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automically if the quoted prices is less than or equal to this value. See Survey.Cost for more details.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700436 }
437
438
439Returns:
440 An object of the form:
441
442 {
443 "resource": { # Representation of an individual survey object. # Survey object containing the specification of the started Survey.
444 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
445 "A String",
446 ],
447 "description": "A String", # Text description of the survey.
448 "title": "A String", # Optional name that will be given to the survey.
449 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700450 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700451 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
452 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700453 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700454 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
455 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
456 "A String",
457 ],
458 "populationSource": "A String", # Online population source where the respondents are sampled from.
459 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
460 "A String",
461 ],
462 "gender": "A String", # Optional gender to target.
463 },
464 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
465 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
466 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700467 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700468 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700469 },
470 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
471 "questions": [ # List of questions defining the survey.
472 { # Message defining the question specifications.
473 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
474 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
475 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
476 "A String",
477 ],
478 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
479 "question": "A String", # Required question text shown to the respondent.
480 "numStars": "A String", # Number of stars to use for ratings questions.
481 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
482 "videoId": "A String", # The YouTube video ID to be show in video questions.
483 "answers": [ # Required list of answer options for a question.
484 "A String",
485 ],
486 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
487 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
488 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
489 "images": [
490 { # Container object for image data and alt_text.
491 "url": "A String", # The read-only URL for the hosted images.
492 "altText": "A String", # The alt text property used in image tags is required for all images.
493 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
494 },
495 ],
496 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
497 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
498 "A String",
499 ],
500 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
501 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
502 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
503 },
504 ],
505 "wantedResponseCount": 42, # Number of responses desired for the survey.
506 },
507 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
508 }</pre>
509</div>
510
511<div class="method">
512 <code class="details" id="stop">stop(resourceId)</code>
513 <pre>Stops a running survey.
514
515Args:
516 resourceId: string, A parameter (required)
517
518Returns:
519 An object of the form:
520
521 {
522 "resource": { # Representation of an individual survey object. # Survey object containing the specification of the stopped Survey.
523 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
524 "A String",
525 ],
526 "description": "A String", # Text description of the survey.
527 "title": "A String", # Optional name that will be given to the survey.
528 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700529 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700530 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
531 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700532 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700533 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
534 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
535 "A String",
536 ],
537 "populationSource": "A String", # Online population source where the respondents are sampled from.
538 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
539 "A String",
540 ],
541 "gender": "A String", # Optional gender to target.
542 },
543 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
544 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
545 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700546 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700547 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700548 },
549 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
550 "questions": [ # List of questions defining the survey.
551 { # Message defining the question specifications.
552 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
553 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
554 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
555 "A String",
556 ],
557 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
558 "question": "A String", # Required question text shown to the respondent.
559 "numStars": "A String", # Number of stars to use for ratings questions.
560 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
561 "videoId": "A String", # The YouTube video ID to be show in video questions.
562 "answers": [ # Required list of answer options for a question.
563 "A String",
564 ],
565 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
566 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
567 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
568 "images": [
569 { # Container object for image data and alt_text.
570 "url": "A String", # The read-only URL for the hosted images.
571 "altText": "A String", # The alt text property used in image tags is required for all images.
572 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
573 },
574 ],
575 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
576 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
577 "A String",
578 ],
579 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
580 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
581 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
582 },
583 ],
584 "wantedResponseCount": 42, # Number of responses desired for the survey.
585 },
586 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
587 }</pre>
588</div>
589
590<div class="method">
591 <code class="details" id="update">update(surveyUrlId, body)</code>
592 <pre>Updates a survey. Currently the only property that can be updated is the owners property.
593
594Args:
595 surveyUrlId: string, External URL ID for the survey. (required)
596 body: object, The request body. (required)
597 The object takes the form of:
598
599{ # Representation of an individual survey object.
600 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
601 "A String",
602 ],
603 "description": "A String", # Text description of the survey.
604 "title": "A String", # Optional name that will be given to the survey.
605 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700606 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700607 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
608 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700609 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700610 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
611 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
612 "A String",
613 ],
614 "populationSource": "A String", # Online population source where the respondents are sampled from.
615 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
616 "A String",
617 ],
618 "gender": "A String", # Optional gender to target.
619 },
620 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
621 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
622 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700623 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700624 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700625 },
626 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
627 "questions": [ # List of questions defining the survey.
628 { # Message defining the question specifications.
629 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
630 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
631 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
632 "A String",
633 ],
634 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
635 "question": "A String", # Required question text shown to the respondent.
636 "numStars": "A String", # Number of stars to use for ratings questions.
637 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
638 "videoId": "A String", # The YouTube video ID to be show in video questions.
639 "answers": [ # Required list of answer options for a question.
640 "A String",
641 ],
642 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
643 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
644 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
645 "images": [
646 { # Container object for image data and alt_text.
647 "url": "A String", # The read-only URL for the hosted images.
648 "altText": "A String", # The alt text property used in image tags is required for all images.
649 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
650 },
651 ],
652 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
653 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
654 "A String",
655 ],
656 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
657 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
658 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
659 },
660 ],
661 "wantedResponseCount": 42, # Number of responses desired for the survey.
662 }
663
664
665Returns:
666 An object of the form:
667
668 { # Representation of an individual survey object.
669 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call.
670 "A String",
671 ],
672 "description": "A String", # Text description of the survey.
673 "title": "A String", # Optional name that will be given to the survey.
674 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700675 "state": "A String", # State that the survey is in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700676 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information
677 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700678 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700679 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.
680 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']
681 "A String",
682 ],
683 "populationSource": "A String", # Online population source where the respondents are sampled from.
684 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification.
685 "A String",
686 ],
687 "gender": "A String", # Optional gender to target.
688 },
689 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses.
690 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos
691 "currencyCode": "A String", # Currency code that the cost is given in.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700692 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700693 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700694 },
695 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI
696 "questions": [ # List of questions defining the survey.
697 { # Message defining the question specifications.
698 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response.
699 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question.
700 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings.
701 "A String",
702 ],
703 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate.
704 "question": "A String", # Required question text shown to the respondent.
705 "numStars": "A String", # Number of stars to use for ratings questions.
706 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response.
707 "videoId": "A String", # The YouTube video ID to be show in video questions.
708 "answers": [ # Required list of answer options for a question.
709 "A String",
710 ],
711 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position.
712 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types.
713 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles).
714 "images": [
715 { # Container object for image data and alt_text.
716 "url": "A String", # The read-only URL for the hosted images.
717 "altText": "A String", # The alt text property used in image tags is required for all images.
718 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.
719 },
720 ],
721 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses.
722 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.
723 "A String",
724 ],
725 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.
726 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize.
727 "openTextPlaceholder": "A String", # Placeholder text for an open text question.
728 },
729 ],
730 "wantedResponseCount": 42, # Number of responses desired for the survey.
731 }</pre>
732</div>
733
734</body></html>