Simpoll API: Developer’s guide

1.1. Introduction

Simpoll API enables interaction of your site with any poll of Simpoll in several ways. the key task solved by Simpoll API — is sending of poll results to your site for further processing.

Simpoll API can be used for:

  • Comparison of Simpoll respondent and visitors of your site;
  • Notification on visitors of your site who have passed the poll;
  • Notification on how successfully the visitor of your site has passed the poll (whether the test is passed or not);
  • List of answers given by visitor of your site in the poll of Simpoll;

1.2. Flow chart

Basically, flow chart of Simpoll API consists of the following steps:

  1. When inserting poll on the site you can give it any additional parameters (for example, User ID);
  2. User passes the poll in Simpoll frame;
  3. When the poll is finished Simpoll calls specified URL (Result URL) on your site and sends back parameters received from you (if any);
  4. Alongside with your parameters, Simpoll sends pol results to Result URL.

Thus, besides notifying you on results, the poll of Simpoll can serve as « proxy» for any your data.

Parameters can be sent to Result URL in one of three ways:

POST method

Data are sent in background mode, unnoticeable for the user and without use of his/her browser. Inquiry is sent when the user presses «Send» button on the last page of the poll.

GET method

Data are sent by redirect of user’s browser to Result URL with GET-parameters added to URL. The user is redirected from the last page of the poll. Thus, option «Open page when the poll is finished» in poll settings is ignored.

Call of Javascript callback-function on your page

In this case your parameters and poll results are sent by Javascript-function call on the page where Simpoll poll is integrated. The function has set name and one argument — object settings of which contain your parameters and poll results.

This method has technical restrictions, since cross-domain data transmission between the frame and your page will not function in Internet Explorer under 8 version and some mobile browsers.

1.3. Data transfer security

Simpoll API supports use of control signature for received and transferred data. Use of signature is not obligatory, but it ensures that data won’t be changed by third party during transfer.