List of operations for resource

Name

URL

Description

Survey list

/surveys

Returns a list of all surveys for a logged in user. Surveys are sorted by date of adding (ascending).

Survey search

/surveys/search

Returns a list of surveys matching the search criteria. Surveys are sorted by date of adding (ascending).

Survey information

/surveys/:id

Detailed survey information. As compared to the data from the previous operation, here information about the domain, skin and key information about the questions will be returned divided by pages

Description of the response parameters

Name/path

Description

Possible values

id

Survey ID

title

Survey title

internal_title

Survey title displayed in the user panel

url_title

Survey title used in “friendly links”

date_created

Date of survey creation

date_published

Date of survey publication - starting the collection of results

null – if the survey was not published
$data – if the survey was published

date_modified

Date of last survey modification

null – if the survey was not modified
$data – if the survey was modified

date_end

Date of the first end of the collection of survey results

null – if the survey was not ended
$data – if the survey was ended

answers_count

Number of survey fillings

status

Survey status

0 – Creating the survey
1 – Collecting results
2 – Analysing results

type

Survey type

0 – Study
1 – Test

2 – Website survey

personal_data

Personal data in a survey

0 – not collected

1 – collected

lang_code

Survey interface language

pl – Polish
en – English

security_level

Survey security level

0 – Low – Anyone can fill it out.

1 – Medium – The survey is available only through a direct link.

2 – High – The survey is available with a password. The same password for all.

3 – Highest – The survey is secured with a single-use token. The number of tokens is equal to the number of respondents.

anonymous

Respondent identification

0 – Enabled – you can associate a filled out survey with a respondent.

1 – Disabled – tokens do not allow to identify the respondent. The survey is anonymous.

password

Survey access password. Set if
Status == 2

many_answers_from_cookie

Filling out the survey

0 – Only once from one computer

1 – Any number of times from one computer

contact_with_author_form

Displaying a button enabling to contact the survey creator

0 – Disabled
1 – Enabled

question_numbers

Displaying question numbers

0 – Disabled
1 – Enabled

progress_bar

Displaying the survey progress bar

0 – Disabled
1 – Enabled

partial_answers

Respondents can return to filling out the survey later

0 – Disabled
1 – Enabled

reversible

Displaying the “Back” button in surveys with more than one page

0 – Disabled
1 – Enabled

answers_limit

The number of surveys filled out after which the study will be ended

autostart_date

Date on which the survey will be automatically activated

expiration_date

Date on which the survey will be automatically ended

archive

Information whether the survey was archived

0 – Not archived
1 – Archived

action_after_answer

Action after filling out

0 – Displaying a thank you window
1 – Returning to the beginning of the survey
2 – Redirection to an external address

redirection

Address of the redirection page to which the respondent will be redirected after filling out the survey, if
action_after_answer == 2

thank_you_text

Thank you message displayed after completing the survey

pages.questions.type

Question type

0 – Single choice
1 – Single matrix
2 – Descriptive
4 – Form
5 – Ranking
6 – Multiple choice
7 – Multiple matrix
8 – Sliders
9 – Descriptive block
10 – Number
11 – Email
12 – Date
13 – Drop-down list
14 – GDPR Clause
15 – File upload
16 – NPS
17 – Descriptive matrix
19 – Drag and drop

Survey list

URL

(GET) https://www.startquestion.com/api/v2/surveys

Optional parameters (POST)

Name

Description

limit

Limit per survey number

offset

Offset per list

Sample response

[
{
"id":69047,
"title":"Tytul ankiety testowej",
"url_title":"tytul-ankiety-testowej",
"date_created":"2011-09-19 13:22:06",
"date_published":"2011-09-19 13:23:10",
"date_modified":"2011-09-19 13:23:10",
"date_end":null,
"answers_count":0,
"status":1,
"type":0,
"personal_data":0,
"lang_code":"pl",
"security_level":0,
"anonymous":0,
"password":"",
"public_results":1,
"many_answers_from_cookie":1,
"email_notification":0,
"comments":1,
"social_media":1,
"contact_with_author_form":1,
"question_numbers":1,
"progress_bar":0,
"partial_answers":0,
"reversible":0,
"answers_limit":0,
"expiration_date":null,
"search_engines":1,
"action_after_answer":0,
"redirection":null,
"thank_you_text":"Dzi\u0119kujemy za wype\u0142nienie ankiety"
},
{
...
}
]


Returned errors

None

Survey search

URL

(GET) https://www.startquestion.com/api/v2/surveys/search

Optional parameters (POST)

Name

Description

title

Survey title

date_created

Survey creation date. The date must be indicated in the following format YYYY-MM-DD (e.g. 2011-11-20). After indicating the parameters, all surveys created on a given date will be returned.

date_published

Date of first survey publication. The date must be indicated in the following format YYYY-MM-DD (e.g. 2011-11-20). After indicating the parameters, all surveys published on a given date will be returned.

date_end

Date of the first end of the collection of survey results The date must be indicated in the following format YYYY-MM-DD (e.g. 2011-11-20). After indicating the parameters, all surveys ended on a given date will be returned.

status

Survey status. Permissible values: 0, 1 and 2

type

Survey type. Permissible values: 0 – survey, 1 – test and 2 – widget

security_level

Survey security level. Permissible values: 0, 1 and 2, 3

limit

Limit per survey number

offset

Offset per list

Sample response

[
{
"id":69047,
"title":"Tytul ankiety testowej",
"internal_title":"[Projekt] Tytul ankiety testowej",
"url_title":"tytul-ankiety-testowej",
"date_created":"2011-09-19 13:22:06",
"date_published":"2011-09-19 13:23:10",
"date_modified":"2011-09-19 13:23:10",
"date_end":null,
"answers_count":0,
"status":1,
"type":0,
"personal_data":0,
"lang_code":"pl",
"security_level":0,
"anonymous":0,
"password":"",
"public_results":1,
"many_answers_from_cookie":1,
"email_notification":0,
"comments":1,
"social_media":1,
"contact_with_author_form":1,
"question_numbers":1,
"progress_bar":0,
"partial_answers":0,
"reversible":0,
"answers_limit":0,
"expiration_date":null,
"search_engines":1,
"action_after_answer":0,
"redirection":null,
"thank_you_text":"Dzi\u0119kujemy za wype\u0142nienie ankiety"
},
{
...
}
]

Returned errors

  • 400 Bad request – Incorrect data format, incorrect status or incorrect security level

  • 500 Internal Server Error – Internal server error

Survey information

URL

(GET) https://www.startquestion.com/api/v2/surveys/:id

Parameters

none

Sample response

{
"id":69047,
"title":"Tytul ankiety testowej",
"url_title":"tytul-ankiety-testowej",
"internal_title":"[Projekt] Tytul ankiety testowej",
"date_created":"2011-09-19 13:22:06",
"date_published":"2011-09-19 13:23:10",
"date_modified":"2011-09-19 13:23:10",
"date_end":null,
"answers_count":0,
"status":1,
"type":0,
"personal_data":0,
"lang_code":"pl",
"security_level":0,
"anonymous":0,
"password":"",
"public_results":1,
"many_answers_from_cookie":1,
"email_notification":0,
"comments":1,
"social_media":1,
"contact_with_author_form":1,
"question_numbers":1,
"progress_bar":0,
"partial_answers":0,
"reversible":0,
"answers_limit":0,
"expiration_date":null,
"search_engines":1,
"action_after_answer":0,
"redirection":null,
"thank_you_text":"Dzi\u0119kujemy za wype\u0142nienie ankiety",
"domain":{
"type":"subdomain",
"main":false,
"address":"subdomena.webankieta.pl"
},
"pages":[
{
"id":261181,
"number":1,
"questions":[
{
"id":804039,
"type":9,
"order":1,
"number":0,
"text":"Blok opisowy",
"desc":"Witamy.",
"date_created":"2011-05-06 00:39:14"
},
{
"..."
}
]
},
{
"id":261182,
"number":2,
"questions":[
{
"id":804041,
"type":0,
"order":1,
"number":1,
"text":"Sk\u0105d dowiedzieli si\u0119 Pa\u0144stwo o naszej restauracji?",
"desc":"",
"date_created":"2011-06-27 16:29:50"
},
{
"..."
}
]
}
],
"skin":{
"id":"115",
"name":"Ankieta.biz",
"head_background":"ffffff",
"progress_bar_background":"93341E",
"title_color":"93341E",
"title_border":"eeeeee",
"question_color":"93341E",
"button_color":"ffffff",
"button_background":"93341E",
"logo":"http:\/\/www.webankieta.pl\/user_files\/user_logo\/16552\/ankietabiz.png"
}
}

Returned errors

  • 404 Not Found – Resource not found or non-existent.

Did this answer your question?