Examinare API - Overview
Get Started with Alat survei Examinare API
Video Tutorial on How to Activate Examinare API
Activate Alat survei Examinare API
Red fields are required and must have a value. XML-data is sent using HTTPS as POST-data.
In the beginning of this document there is a summary of the available functions. This is followed by a more detailed part.
The URL for all functions is
https://api.examinare.com/framework
To connect you need to add three commands to the POST data:
apiKey – This is provided by Examinare in your account.
apiCompany – The company database to be used.
Command – The command you provide for the call.
Please note: More commands may be needed by the function you call.
Mobile API and non-shared API keys.
If you for any reason want to keep your API key private and use a Login type of Style instead of the Static Examinare API key then you may use the Mobile API command setPhoneID, this command can be used to get a Mobile API token that can be used instead of the static API token. All mobile API tokens can be deleted at any time from your Examinare account inside the Settings -> Advanced Settings.
PHP Wrapper Library
PHP example
<?php
class ExaminareAPIConnector{
public $credentials;
public $command;
public $sendinfo;
public $returnjson=0;
public function __construct ($apiuser,$apikey,$apiurl){
if($apiurl==""){$apiurl="api.examinare.com";}
$url="https://".$apiurl."/framework";
$companyid=$apiuser;
$token=$apikey;
$this->sendinfo['apiKey']=$token;
$this->sendinfo['apiCompany']=$companyid;
$this->sendinfo['url']=$url;
}
public function setCommand($Command){
$this->sendinfo['Command']=$Command;
}
public function Data($sendinfo){
foreach ($sendinfo as $key => $value)
{$this->sendinfo[$key]=$value;}
}
public function JsonEnable(){
$this->returnjson=1;
}
public function Execute(){
$sendinfo=$this->sendinfo;
$method = "POST";
$action=$this->sendinfo['url'];
$fields="";
foreach ($sendinfo as $key => $value)
{
if ($key != 'url')
{
$fields .= $key . '=' . rawurlencode($value) . '&';
}
}
$fields = substr($fields, 0, strlen($fields) - 1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $action);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$info_arrays = curl_getinfo($ch);
curl_close($ch);
if($result === false ){
return false;
}else{
if($this->returnjson==1){
return json_decode($result,1);
}else{
return $this->toArray(new SimpleXMLElement($result));
}
}
}
public function ExecuteRaw(){ // Used to get the raw file from the url.
$sendinfo=$this->sendinfo;
$method = "POST";
$action=$this->sendinfo['url'];
$fields="";
foreach ($sendinfo as $key => $value)
{
if ($key != 'url')
{
$fields .= $key . '=' . rawurlencode($value) . '&';
}
}
$fields = substr($fields, 0, strlen($fields) - 1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $action);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$info_arrays = curl_getinfo($ch);
curl_close($ch);
if($result === false ){
return false;
}else{
return $result;
}
}
public function toArray($xml) {
$array = json_decode(json_encode($xml), TRUE);
foreach ( array_slice($array, 0) as $key => $value ) {
if ( empty($value) ) $array[$key] = NULL;
elseif ( is_array($value) ) $array[$key] = $this->toArray($value);
}
return $array;
}
}
?>
The PHP Wrapper Library Code.
No downloads OR long readme files.
Just copy and paste into where you want the code put.
If you choose the filename “examinare-api.php” then all PHP Code examples on this site will work with the urls.
Otherwise, you need to update your code’s include statement at the top. Our PHP wrapper is available on GitHub. https://github.com/examinare/examinare-php-wrapper
setPhoneID (Use Mobile API)
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<tokens>
<token>UMOBI:7182101920d9s9f7d8f6d76f7sd8sd98as</token>
<cname>CNAME</cname>
</tokens>
</response>
With the setPhoneID you can create your own API keys that will be connected to a live administrative user in your Examinare account. You need to activate the Mobile Keys functions in your Configuration tab in your Examinare account.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| apiCompany | Company ID |
| user | Administrators Username |
| pass | Administrators Password in MD5 encryption. |
| deviceInformation | Optional text to describe the API connector Device. Will be displayed in the API tokens list in your account. |
Want to build solutions based on Examinare?
We offer a Developer Account that can be used for creating a Sandbox or used for building external applications for the Examinare API where your customers can then use your solution with their Examinare account.
The developer account has all the functions of a normal account, because of its low price you cannot use these accounts for commercial use.
99 USD
- Unlimited Answers, Polls & Recipients
- Publish 1 Survey at the same time
- Ready-made template library
- Email Support only
- Yearly Subscription
- Examinare API Access
- Not for Commercial Use
Surveys
clearVotes
No Preview
Clear the votes from a survey. Will delete all votes in a survey, use with caution!
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
Return data
This API call will return a single status information if successful otherwise an error message that the survey cannot be found.
copySurvey
No Preview
Copy a Survey and return information of the newly created Survey.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| name | Name of the Survey (Will only be shown in Account) |
Return data
This API call will return a single XML survey container. XML survey container will contain the information including the surveyID that will be used in your calls to the framework.
(See listSurveys for formatting help.)
fetchResults
PHP Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("fetchResults");
$api2->Data(array("surveyID"=>"REPLACE WITH YOUR SURVEY ID"));
// Timestamps are not needed but good to use.
//This example below is for results between 1 january 2015 and 31 december 2015.
$api2->Data(array("timestamp1"=>1420070400));//01/01/2015 @ 12:00am (UTC)
$api2->Data(array("timestamp2"=>1451606400));//01/01/2016 @ 12:00am (UTC)
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Survey Results ready to use.*/
?>
Example Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<result>
<surveyInfo surveyID="1315983192">
<surveyID>1315983192</surveyID>
<surveyCount>2</surveyCount>
</surveyInfo>
</result>
<results>
<question Number="1">
<questionNumber>1</questionNumber>
<questionInfo>
<questionText>Do you have a Customer Service system in place?||!linebreak!||(A process that ensures a minimum level of service)</questionText>
<questionType>Multichoise_question</questionType>
<questionTypeID>1</questionTypeID>
</questionInfo>
<alternative>
<captionText>Yes</captionText>
<numResult>0</numResult>
</alternative>
<alternative>
<captionText>No</captionText>
<numResult>2</numResult>
</alternative>
</question>
</results>
</response>
Fetch the results from the Survey without background data filtering.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| timestamp1 | Used in combination with timestamp2 to select votes between 2 dates. Needs to be in form of UNIX timestamp. |
| timestamp2 | UNIX timestamp. |
| allowcomments | Set this parameter to anything return the comments entered on surveys questions. |
fetchResultsByInfoReg
Example Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<result>
<surveyInfo surveyID="1315983192">
<surveyID>1315983192</surveyID>
<surveyCount>2</surveyCount>
</surveyInfo>
</result>
<results>
<question Number="1">
<questionNumber>1</questionNumber>
<questionInfo>
<questionText>Do you have a Customer Service system in place?||!linebreak!||(A process that ensures a minimum level of service)</questionText>
<questionType>Multichoise_question</questionType>
<questionTypeID>1</questionTypeID>
</questionInfo>
<alternative>
<captionText>Yes</captionText>
<numResult>0</numResult>
</alternative>
<alternative>
<captionText>No</captionText>
<numResult>2</numResult>
</alternative>
</question>
</results>
</response>
Fetch the results from the Survey with transaction ID.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| timestamp1 | Used in combination with timestamp2 to select votes between 2 dates. Needs to be in form of UNIX timestamp. |
| timestamp2 | UNIX timestamp. |
| infoReg | Transaction ID, can be collected when using automatic return with tracecode in URL. Contact tech support for more information. |
Wildcard enabled => Apply * to use Wildcard. Example : Nisse can be “N*e”
fetchResultsByUser
Example Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<result>
<surveyInfo surveyID="1315983192">
<surveyID>1315983192</surveyID>
<surveyCount>2</surveyCount>
</surveyInfo>
</result>
<results>
<question Number="1">
<questionNumber>1</questionNumber>
<questionInfo>
<questionText>Do you have a Customer Service system in place?||!linebreak!||(A process that ensures a minimum level of service)</questionText>
<questionType>Multichoise_question</questionType>
<questionTypeID>1</questionTypeID>
</questionInfo>
<alternative>
<captionText>Yes</captionText>
<numResult>0</numResult>
</alternative>
<alternative>
<captionText>No</captionText>
<numResult>2</numResult>
</alternative>
</question>
</results>
</response>
Fetch the results from the Survey with background data filtering.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| timestamp1 | Used in combination with timestamp2 to select votes between 2 dates. Needs to be in form of UNIX timestamp. |
| timestamp2 | UNIX timestamp. |
| contactID | contactID connected to the recipient. (Wildcard enabled) |
| Email belonging to the recipient. (Wildcard enabled) | |
| group | Group name belonging to the recipient. (Wildcard enabled) |
| title | Title belonging to the recipient. (Wildcard enabled) |
| company | Company name belonging to the recipient. (Wildcard enabled) |
| company-title | Recipients company title. (Wildcard enabled) |
| department | Department in the company. (Wildcard enabled) |
| customer-group | Customer group. (Wildcard enabled) |
| gender | See customer information. |
| address | Address (Wildcard enabled) |
| state | State (Wildcard enabled) |
| country | Country (Wildcard enabled) |
| city | City (Wildcard enabled) |
| postal-code | Postal code (Wildcard enabled) |
Wildcard enabled => Apply * to use Wildcard. Example : Nisse can be N*e
getRecipientsBasedByResults
No Preview
This function uses the same indata as the fetchResultsByUser and shows the recipients who have answered based on in-data.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| timestamp1 | Used in combination with timestamp2 to select votes between 2 dates. Needs to be in form of UNIX timestamp. |
| timestamp2 | UNIX timestamp. |
| contactID | contactID connected to the recipient. (Wildcard enabled) |
| Email belonging to the recipient. (Wildcard enabled) | |
| group | Group name belonging to the recipient. (Wildcard enabled) |
| title | Title belonging to the recipient. (Wildcard enabled) |
| company | Company name belonging to the recipient. (Wildcard enabled) |
| company-title | Recipients company title. (Wildcard enabled) |
| department | Department in the company. (Wildcard enabled) |
| customer-group | Customer group. (Wildcard enabled) |
| gender | See customer information. |
| address | Address (Wildcard enabled) |
| state | State (Wildcard enabled) |
| country | Country (Wildcard enabled) |
| city | City (Wildcard enabled) |
| postal-code | Postal code (Wildcard enabled) |
Wildcard enabled => Apply * to use Wildcard. Example : Nisse can be N*e
importSurvey
No Preview
Import Examinare file into your account.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| examinarexml | File content of the Examinare Survey File (.examinare) |
Please note: We only recommend sending a preformatted or translated Examinare Survey File to the system.
If you change the structure of the file it can create an error while using the survey. If you translate the file, make sure to use the translation function inside the tool.
listSurveys
Example Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Status</status>
<surveys>
<surveyInfo surveyID=”surveyID”>
<surveyID>829128191289</surveyID>
<surveyName>Survey name</ surveyName>
<surveyTaggName>Name of the tag</surveyTaggName>
<status>Public survey</status>
<surveyLinkWeb>{URL}</surveyLinkWeb>
<surveyLinkMobile>{URL}</surveyLinkMobile>
<completedAnswers>150</completedAnswers>
<stoppedAnswers>0</stoppedAnswers>
<surveyLanguage>sv</surveyLanguage>
</surveyInfo>
</surveys>
</response>
POST data information:
This function does not need any extra POST data.
Return data
This API call will return a multiple XML survey container. XML survey container will contain the information including the surveyID that will be used in your calls to the framework.
questionsInSurveys
Example Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<survey>
<surveyInfosurveyID="1315983192">
<surveyID>1315983192</surveyID>
</surveyInfo>
</survey>
<questions>
<question Number="1">
<questionNumber>1</questionNumber>
<questionText>Do you have a Customer Service system in place?||!linebreak!||(A process that ensures a minimum level of service)</questionText>
<InstructionText></InstructionText>
<InstructionPos></InstructionPos>
<questionType>Multichoise_question</questionType>
<alternative>
<alternativeID>1</alternativeID>
<captionText>Yes</captionText>
</alternative>
<alternative>
<alternativeID>2</alternativeID>
<captionText>No</captionText>
</alternative>
</question>
</questions>
</response>
Fetch all questions from a Survey.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
searchFreeText
No Code Preview
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | SurveyID of the Survey you want to search |
| Text | Phrase you want to search for. Wildcard (*) enabled. |
sendMessageEmail
PHP Example Code
PHP example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("sendMessageEmail");
$details = Array();
$details["user_1"]="ContactID";
$details["delivery_message"]=$emailmessage["body"];
$details["delivery_subject"]=$emailmessage["subject"];
$api2->Data($details);
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the send ID.*/
?>
Example Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>ADDED</status>
</report>
<report>
<contactID>UE1317299990U4e8373923c70c</contactID>
<status>ERROR</status>
</report>
</reports>
</response>
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
| delivery_message | Message to be sent by Email. Maximum 220 characters. |
| delivery_subject | Subject of the message. |
| rtl | Use RTL encoding for Arabic and Hebrew. Set 1 for yes or do not set for no. |
| includelogo | Use logo in the top banner. Set 1 for yes or do not set for no. |
sendMessageSMS
PHP Example Code
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("sendMessageSMS");
$details = Array();
$details["user_1"]="ContactID";
$details["delivery_message"]=$emailmessage["body"];
$details["delivery_subject"]=$emailmessage["subject"];
$details["delivery_by"]="SMS";// Must be set otherwise it will be sent by Email.
$api2->Data($details);
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the send ID.*/
?>
Example Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>ADDED</status>
</report>
<report>
<contactID>UE1317299990U4e8373923c70c</contactID>
<status>ERROR</status>
</report>
</reports>
</response>
Send SMS message to recipients.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
| delivery_message | Message to be sent by SMS. Maximum 220 characters. |
| rtl | Use RTL encoding for Arabic and Hebrew. Set 1 for yes or do not set for no. |
Observe: This message will not have a link to a Survey or Poll. If you want to add a link to a Survey the use the API Call named “sendSurvey (SMS)”.
sendSurvey (Email)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("sendSurvey");
$details = Array();
$details["surveyID"]="SURVEYID";
$details["user_1"]="ContactID";
$details["delivery_message"]=$emailmessage["body"];
$details["delivery_subject"]=$emailmessage["subject"];
$api2->Data($details);
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the send ID.*/
?>
Sample Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>ADDED</status>
</report>
<report>
<contactID>UE1317299990U4e8373923c70c</contactID>
<status>ERROR</status>
</report>
</reports>
</response>
Send email invitations to recipients.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
| delivery_message | Message to be sent by Email. Maximum 220 characters. |
| delivery_subject | Subject of the message. |
| includelogo | Use logo in the top banner. Set 1 for yes or do not set for no. |
| schedule | Schedule this email for later delivery. Must contain a UNIX Timestamp |
sendSurvey (SMS)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("sendSurvey");
$details = Array();
$details["surveyID"]="SURVEYID";
$details["user_1"]="ContactID";
$details["delivery_message"]=$emailmessage["body"];
$details["delivery_subject"]=$emailmessage["subject"];
$details["delivery_by"]="SMS";// Must be set otherwise it will be sent by Email.
$api2->Data($details);
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the send ID.*/
?>
Sample Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>ADDED</status>
</report>
<report>
<contactID>UE1317299990U4e8373923c70c</contactID>
<status>ERROR</status>
</report>
</reports>
</response>
Send SMS invitations to recipients.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
| delivery_message | Message to be sent by SMS. |
| delivery_by | Must be set to SMS. |
| schedule | Schedule this SMS for later delivery. Must contain a UNIX Timestamp |
updateInstructionText
No Preview
Update the Instructional Text with QuestionNumber in Survey.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| surveyID | SurveyID, see listSurveys for more info |
| instructionText | New Instructional Text for this Question. (Apply ||!linebreak!|| instead of linebreaks) |
| questionNumber | Question Number found in listSurveys. |
Return data
This API call will return an XML response with status Success if it is updated, error if an error has been called. List structure of will be returned, see questionInSurveys for more information of structure.
updateQuestionText
No Preview
Update the Questions Text with QuestionNumber in Survey.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| surveyID | SurveyID, see listSurveys for more info |
| questionText | New Question of this Survey. (Apply ||!linebreak!|| instead of linebreaks) |
| questionNumber | Question Number found in listSurveys. |
Return data
This API call will return an XML response with status Success if it is updated, error if an error has been called. List structure of will be returned, see questionInSurveys for more information of structure.
Recipients
addRecipient
Return data
This API call will return an XML response with status Success if it is created, error if an error has been called. The XML contacts container will contain the information including the contactID that will be used in your calls to the framework.
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("addRecipient");
$recipient_r = Array();
$recipient_r["name"]="My name";
$recipient_r["email"]="myname@mydomain.com";
$recipient_r["group"]="My Group";
$api2->Data($recipient_r);
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipient record to use.*/
?>
Sample Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Status</status>
<contacts>
<contact cid="contactID">
<contactID>829128191289</contactID>
<authCode>829108</authCode>
<name>Name</name>
<lastname>Last name</lastname>
<email>info@domain.com</email>
<mobile>+467031234567</mobile>
<group>Groupname</group>
<title>Mr</title>
<company>Company name</company>
<company-title>Company name</company-title>
<department>Sales</department>
<customer-group>Sales groups</customer-group>
<gender>male</gender>
<birth-year>1919</birth-year>
<birth-month>1919</birth-month>
<birth-day>1919</birth-day>
<phonenumber>+46844444444</ phonenumber>
<attention>Attention</attention>
<address>Adress</address>
<city>Kristianstad</city>
<postal-code>29184</postal-code>
<state>Skane</state>
<country>Sweden</country>
<crmserial>15001</crmserial>
<extrafields>
<extrafield>
<key>f54601af5d3377</key>
<value>Testar åäö</value>
</extrafield>
<extrafield>
<key>f5461293d9b22d</key>
<value></value>
</extrafield>
<extrafield>
<key>f5460eb07e2f93</key>
<value>7</value>
</extrafield>
</extrafields>
</contact>
</contacts>
</response>
Add recipient to the company database.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| name | First name of the recipient. |
| lastname | Last name of the recipient. |
| Email of the recipient. | |
| mobile | Cell phone number. (Format 00[Countrycode][Area code][Phone number])Example : 00467031234567 |
| group | Group name. |
| title | Personal title. |
| company | Company name. |
| company-title | Company title of the recipient. |
| department | Department in Company. |
| customer-group | Customer group. |
| gender | Gender of the recipient. (male for Male, female for Female). |
| birth-year | Year of birth (YYYY), digits only. |
| birth-month | Month of birth (MM), digits only. |
| birth-day | Day of birth (DD), digits only. |
| phonenumber | Phone number of the recipient. |
| attention | Attention address of the recipient. |
| address | Address of the recipient. |
| city | City name. |
| state | State name. |
| postal-code | Postal code. |
| country | Country name. |
| crmserial | Serial from integration module for ex. Zendesk ticket ID. |
| extrafieldkey | Key from extrafields in the format below. |
delRecipient
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("delRecipient");
$api2->Data(array("contactID"=>"Change with ContactID from Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any.*/
?>
Deletes a recipient in the company database.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
Return data
This API call will return an XML response with status Success if it is deleted, error if an error has been called.
listRecipientByContactID
Return data
This API call will return a single XML contacts container. XML contacts container will contain the information including the contactID that will be used in your calls to the framework. (See addRecipient)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipientByContactID");
$api2->Data(array("contactID"=>"ContactID of your Survey in Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipients in an array.*/
?>
List information of a single recipient using the recipient’s contactID.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
listRecipientByCRMSerial
Return data
This API call will return a single XML contacts container. XML contacts container will contain the information including the contactID that will be used in your calls to the framework. Observe, this call can return multiple contacts. (See addRecipient)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipientByCRMSerial");
/* Example for the Zendesk ticket id 1*/
$api2->Data(array("crmserial"=>"Zendesk:1"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipients in an array.*/
?>
List information of a single recipient with help of the CRM Serial that is created in the Examinare extensions available.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| crmserial | Crm Serial including plugin structure. Check the Recipient Screen for details. |
listRecipientByEmail
Return data
This API call will return a single XML contacts container. XML contacts container will contain the information including the contactID that will be used in your calls to the framework. Observe, this call can return multiple contacts. (See addRecipient)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipientByEmail");
$api2->Data(array("email"=>"my@email.xxx"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipients in an array.*/
?>
List information of a single recipient using the recipient’s email.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| Contact Email Address from your Examinare database. |
listRecipients
Return data
This API call will return a multiple XML contacts container. XML contacts container will contain the information including the contactID that will be used in your calls to the framework. (See addRecipient)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipients");
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the all Recipients in an array.*/
?>
Fetch a complete list of all the Recipients in your Examinare database.
POST data information:
This function does not need any extra POST data.
listRecipientsByGroup
Return data
This API call will return a single XML contacts container. XML contacts container will contain the information including the contactID that will be used in your calls to the framework. (See addRecipient)
information including the contactID that will be used in your calls to the framework. (See addRecipient)
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipientsByGroup");
$api2->Data(array("group"=>"Name of your Group in Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipients in an array.*/
?>
List information of recipients by Groupname.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| group | Group Name |
listRecipientsExtraFields
information including the contactID that will be used in your calls to the framework. (See addRecipient)
PHP Code Example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<extrafields>
<extrafield>
<key>f54601af5d3377</key>
<caption>Field1</caption>
<type>text</type>
<options></options>
</extrafield>
<extrafield>
<key>f5461293d9b22d</key>
<caption>Field3</caption>
<type>checkbox</type>
<options></options>
</extrafield>
<extrafield>
<key>f5460eb07e2f93</key>
<caption>Testing</caption>
<type>select</type>
<options>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</options>
</extrafield>
</extrafields>
</response>
Recipients profile can be extended with Extra Fields and these are sent when adding, loading, updating Recipients.
POST data information:
This function do not take any POST parameters.
Return data
| key | Key used in recipient data. |
| caption | Caption of the field from Examinare Settings. |
| type | Type of field, (select, text, checkbox) |
| options | Options when using the select type of field. |
listRecipientsToSurvey
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listRecipientsToSurvey");
$api2->Data(array("surveyID"=>"Survey ID of your Survey in Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the Recipients in an array.*/
?>
Example Output
<?xml version=”1.0" encoding=”utf-8"?>
<response>
<status>Success</status>
<contacts>
<contact cid=”UI1317137541U4e81ec85c8c61">
<contactID>UI1317137541U4e81ec85c8c61</contactID>
<authCode>258848</authCode>
<name>Peter</name>
<lastname>Lastname</lastname>
<email>peter@domain.com</email>
<mobile>+4670000000</mobile>
<group>Customer Service Rating</group>
<title></title>
<company></company>
<company-title></company-title>
<department></department>
<customer-group></customer-group>
<gender>none</gender>
<birth-year></birth-year>
<birth-month></birth-month>
<birth-day></birth-day>
<phonenumber></phonenumber>
<attention></attention>
<address></address>
<city></city>
<postal-code></postal-code>
<state></state>
<country></country>
<surveyLinkWeb>LINK</surveyLinkWeb>
<surveyLinkMobile>LINK</surveyLinkMobile>
<surveyStatus>ANSWERED</surveyStatus>
</contact>
</contacts>
</response>
List all recipients links and status of the invitations being sent from Examinare.
Please note: Only anonymous and private surveys can be used with this command.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
listSurveysByUser
Return data
This API call will return a multiple XML survey container. XML survey container will contain the information including the surveyID that will be used in your calls to the framework.
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listSurveysByUser");
$api2->Data(array("contactID"=>"Contact ID in Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the contact information with all Surveys in an array.*/
?>
List all Surveys connected to a recipient and status.
POST data information
(Red information is mandatory), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
markRecipientsToSurvey
Example Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>MARKED</status>
</report>
</reports>
</response>
Mark recipients as invited to a single Survey in Examinare status log.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
listSurveysByUser
Return data
This API call will return a multiple XML survey container. XML survey container will contain the information including the surveyID that will be used in your calls to the framework.
PHP Code Example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api2 = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api2->setCommand("listSurveysByUser");
$api2->Data(array("contactID"=>"Contact ID in Examinare"));
$result=$api2->Execute();
/* In $result you will now find all
returnable errors if any or the contact information with all Surveys in an array.*/
?>
Sample Output
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<contacts>
<contact cid="UQ1289426855U4cdb17a7dde8c">
<contactID>UQ1289426855U4cdb17a7dde8c</contactID>
<authCode>178059</authCode>
<name>John</name>
<lastname>Doe</lastname>
<email>info@email.go</email>
<mobile></mobile>
<group>Facebook</group>
<title>none</title>
<company></company>
<company-title></company-title>
<department></department>
<customer-group>Facebook</customer-group>
<gender>man</gender>
<birth-year>2002</birth-year>
<birth-month>01</birth-month>
<birth-day>02</birth-day>
<phonenumber></phonenumber>
<attention></attention>
<address></address>
<city></city>
<postal-code></postal-code>
<state></state>
<country>en_US</country>
<surveys>
<surveyInfo surveyID="1321866201">
<surveyID>1321866201</surveyID>
<surveyName>Survey1</surveyName>
<surveyTaggName></surveyTaggName>
<completed>FALSE</completed>
<attending>TRUE</attending>
<surveyLinkWeb>URL</surveyLinkWeb>
<surveyLinkMobile>URL</surveyLinkMobile>
<surveyLanguage>th</surveyLanguage> </surveyInfo>
<surveyInfo surveyID="1260279826">
<surveyID>1260279826</surveyID>
<surveyName>Survey2</surveyName>
<surveyTaggName></surveyTaggName>
<completed>FALSE</completed>
<attending>FALSE</attending>
<surveyLinkWeb>URL</surveyLinkWeb>
<surveyLinkMobile>URL</surveyLinkMobile>
<surveyLanguage>hi</surveyLanguage>
</surveyInfo>
</surveys>
</contact>
</contacts>
</response>
List all Surveys connected to a recipient and status.
POST data information
(Red information is mandatory), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
markRecipientsToSurvey
No Preview
Mark recipients as invited to a single Survey in Examinare status log.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
updateGenderRecipient
Return data
This API call will return an XML response with status Success if it is updated, error if an error has been called. The XML contacts container will contain the information including the contactID that will be used in your calls to the framework. (See addRecipient)
Please note that example below is for addrecipient and needs to be adjusted to use the update function.
Sample Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Status</status>
<contacts>
<contact cid="contactID">
<contactID>829128191289</contactID>
<authCode>829108</authCode>
<name>Name</name>
<lastname>Last name</lastname>
<email>info@domain.com</email>
<mobile>+467031234567</mobile>
<group>Groupname</group>
<title>Mr</title>
<company>Company name</company>
<company-title>Company name</company-title>
<department>Sales</department>
<customer-group>Sales groups</customer-group>
<gender>male</gender>
<birth-year>1919</birth-year>
<birth-month>1919</birth-month>
<birth-day>1919</birth-day>
<phonenumber>+46844444444</ phonenumber>
<attention>Attention</attention>
<address>Adress</address>
<city>Kristianstad</city>
<postal-code>29184</postal-code>
<state>Skane</state>
<country>Sweden</country>
<crmserial>15001</crmserial>
<extrafields>
<extrafield>
<key>f54601af5d3377</key>
<value>Testar åäö</value>
</extrafield>
<extrafield>
<key>f5461293d9b22d</key>
<value></value>
</extrafield>
<extrafield>
<key>f5460eb07e2f93</key>
<value>7</value>
</extrafield>
</extrafields>
</contact>
</contacts>
</response>
Update the gender information for a single recipient.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
| gender | Gender of the recipient. (male for Male, female for Female). |
updateRecipient
Return data
This API call will return an XML response with status Success if it is updated, error if an error has been called. The XML contacts container will contain the information including the contactID that will be used in your calls to the framework. (See addRecipient)
Please note that example below is for addrecipient and needs to be adjusted to use the update function.
Sample Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Status</status>
<contacts>
<contact cid="contactID">
<contactID>829128191289</contactID>
<authCode>829108</authCode>
<name>Name</name>
<lastname>Last name</lastname>
<email>info@domain.com</email>
<mobile>+467031234567</mobile>
<group>Groupname</group>
<title>Mr</title>
<company>Company name</company>
<company-title>Company name</company-title>
<department>Sales</department>
<customer-group>Sales groups</customer-group>
<gender>male</gender>
<birth-year>1919</birth-year>
<birth-month>1919</birth-month>
<birth-day>1919</birth-day>
<phonenumber>+46844444444</ phonenumber>
<attention>Attention</attention>
<address>Adress</address>
<city>Kristianstad</city>
<postal-code>29184</postal-code>
<state>Skane</state>
<country>Sweden</country>
<crmserial>15001</crmserial>
<extrafields>
<extrafield>
<key>f54601af5d3377</key>
<value>Testar åäö</value>
</extrafield>
<extrafield>
<key>f5461293d9b22d</key>
<value></value>
</extrafield>
<extrafield>
<key>f5460eb07e2f93</key>
<value>7</value>
</extrafield>
</extrafields>
</contact>
</contacts>
</response>
Update the recipients information in Examinare database.
POST data information:
(Red information is mandatory, black is optional), all POST data captions are case-sensitive.
| contactID | Contact ID from your Examinare database. |
| name | First name of the recipient. |
| lastname | Last name of the recipient. |
| Email of the recipient. | |
| mobile | Cell phone number. (Format 00[Countrycode][Area code][Phone number])Example : 00467031234567 |
| group | Group name. |
| title | Personal title. |
| company | Company name. |
| company-title | Company title of the recipient. |
| department | Department in Company. |
| customer-group | Customer group. |
| gender | Gender of the recipient. (male for Male, female for Female). |
| birth-year | Year of birth (YYYY), digits only. |
| birth-month | Month of birth (MM), digits only. |
| birth-day | Day of birth (DD), digits only. |
| phonenumber | Phone number of the recipient. |
| attention | Attention address of the recipient. |
| address | Address of the recipient. |
| city | City name. |
| state | State name. |
| postal-code | Postal code. |
| country | Country name. |
| extrafieldkey | Key from extrafields. |
Survey Report Files
fetchReportFile
PHP Example
PHP example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api->setCommand("fetchResults");
$api->setCommand("fetchReportFileList");
$api->Data(array('surveyID'=>"SURVEYID GOES HERE", "reportID" => 'REPORT ID FROM fetchReportFileList goes here.');
$file = $api->ExecuteRaw();
$quoted = "FILE NAME GOES HERE . extension";
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $quoted);
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . strlen($file));
echo $file;
/* In $reports_r you will now find all
returnable errors if any or the Report File ID's ready to use with fetchReportFile.*/
?>
Sample Output
Code example
RAW FILE CONTENT
Fetch a report from your account with the information from fetchReportFileList.
PLEASE NOTE: This function returns the actual file with headers and NOT an XML structure. Make sure you upgrade your wrapper to the newest version to be enabled to use the PHP Wrapper for this function.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| reportID | Id of the report from the function fetchReportFileList. |
fetchReportFileList
PHP Example
PHP example
<?php
include_once("examinare-api.php");
$key["apicompany"]="XXXX";
$key["apikey"]="YYYYYY";
/* Change the top information
according to your account details. */
$api = new ExaminareAPIConnector($key["apicompany"],$key["apikey"],"");
$api->setCommand("fetchResults");
$api->setCommand("fetchReportFileList");
$api->Data(array('surveyID'=>"1314773374");
$reports_r=$api->Execute();
/* In $reports_r you will now find all
returnable errors if any or the Report File ID's ready to use with fetchReportFile.*/
?>
Sample Output
XML example
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<surveys><surveyInfo surveyID="1314773374">
<surveyID>1314773374</surveyID>
<surveyName>Company Service Rating</surveyName>
<surveyTaggName></surveyTaggName>
<reportUrls>
<reportUrl>
<reportID>mainexcel</reportID>
<name>Company Service Rating - Main Report.xls</name>
</reportUrl>
<reportUrl>
<reportID>maindocx</reportID>
<name>Company Service Rating - Main Report.docx</name>
</reportUrl>
<reportUrl>
<reportID>mainpdf</reportID>
<name>Company Service Rating - Main Report.pdf</name>
</reportUrl>
<reportUrl>
<reportID>rawspss</reportID>
<name>Company Service Rating - Raw.sps</name>
</reportUrl>
</reportUrls>
</surveyInfo>
</surveys>
</response>
Fetch list of reports from the Survey to use with the fetchReportFile function.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
Magic Polls
fetchMagicPollSummary
Sample return 1
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<MagicPolls>
<MagicPollInfo magicID="1365745486">
<magicID>1365745486</magicID>
<magicName>Magic Poll Question</magicName>
<completedAnswers>
<Summary>0</Summary>
<Options>
<Option>
<Number>1</Number>
<OptionText>Option 1</OptionText>
<Result>0</Result>
<Percent></Percent>
</Option>
<Option>
<Number>2</Number>
<OptionText>Option 2</OptionText>
<Result>0</Result>
<Percent></Percent>
</Option>
</Options>
</completedAnswers>
<stoppedAnswers>
<Summary>0</Summary>
</stoppedAnswers>
</MagicPollInfo>
</MagicPolls>
</response>
Sample return 2
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<MagicPolls>
<MagicPollInfo magicID="1365745486">
<magicID>1365745486</magicID>
<magicName>TestPoll</magicName>
<completedAnswers>
<Summary>5</Summary>
<Options>
<Option>
<Number>1</Number>
<OptionText>Option 1</OptionText>
<Result>2</Result>
<Percent>40</Percent>
</Option>
<Option>
<Number>2</Number>
<OptionText>Option 2</OptionText>
<Result>3</Result>
<Percent>60</Percent>
</Option>
</Options>
<SMS>
<answer>
<id>MOBILE;+46XXXXXXXX.1381480943</id>
<when>2013-10-11 10:42:23</when>
<stamp>1381480943</stamp>
<phrase>2</phrase>
<from>+46XXXXXXXX</from>
</answer>
<answer>
<id>MOBILE;+46XXXXXXXX.1381479624</id>
<when>2013-10-11 10:20:24</when>
<stamp>1381479624</stamp>
<phrase>2</phrase>
<from>+46XXXXXXXX</from>
</answer>
<answer>
<id>MOBILE;+46XXXXXXXX.1381479600</id>
<when>2013-10-11 10:20:00</when>
<stamp>1381479600</stamp>
<phrase>1</phrase>
<from>+46XXXXXXXX</from>
</answer>
</SMS>
<Twitter>
<answer>
<id>TWITTER;XXXXXXXX:388576542420267009.1381479489</id>
<when>2013-10-11 10:18:09</when>
<stamp>1381479489</stamp>
<phrase>1</phrase>
<from>XXXXXXXX</from>
</answer>
</Twitter>
<Web>
<answer>
<id>WEBSITE;j186hntcn28efok6t6oeg94fv5;XXX.XXX.XXX.XXX.1381479661</id>
<when>2013-10-11 10:21:01</when>
<stamp>1381479661</stamp>
<phrase>Option 2</phrase>
<from>http://XXX.examinare.net/mp/1365745486/</from>
<ip>XXX.XXX.XXX.XXX</ip>
</answer>
</Web>
</completedAnswers>
<stoppedAnswers>
<Summary>0</Summary>
</stoppedAnswers>
</MagicPollInfo>
</MagicPolls>
</response>
POST data information:
This function can be used with an optional POST key called magicID. When magicID is defined more detailed results are added to the XML return.
Return data
This API call will return a multiple XML Magic Poll container if magicID is not defined (Sample return 1).
If magicID is defined it will return more detailed information (Sample return 2).
Sample return 1
Key information 1
| magicID | Id of the Magic Poll in Examinare. |
| magicName | The question asked. |
| completedAnswers | Completed answers in the Poll. |
| Options | Options with results from the poll. If added Options. If no options this field is empty. |
| – Number | Identification number of the Polls Option. |
| – Optiontext | Text of the Polls Option |
| – Result | The result of the Poll Option |
| – Percent | The percentage of the Poll Option compared to Summary of Completed Answers. |
Sample return 2
Key information 2
For generic fields in this section please check Key Information 1 since this part only handle the difference between Key information 1 and 2.
| SMS | Container for SMS votes |
| – Answer | Container for individual SMS answer. |
| – – id | Id of this vote in Examinare. |
| – – when | Date of the vote in Y-M-D Time format |
| – – stamp | Unix Timestamp of the vote |
| – – phrase | Phrase sent in. |
| – – from | Phonenumber who sent it in. |
| Container for Twitter votes. | |
| – Answer | Container for individual Twitter answer. |
| – – id | Id of this vote in Examinare. |
| – – when | Date of the vote in Y-M-D Time format |
| – – stamp | Unix Timestamp of the vote |
| – – phrase | Phrase sent in. |
| – – from | TwitterID who sent it in. |
| Web | Container for Web votes |
| – Answer | Container for individual Web votes. |
| – – id | Id of this vote in Examinare. |
| – – when | Date of the vote in Y-M-D Time format |
| – – stamp | Unix Timestamp of the vote |
| – – phrase | Phrase sent in. |
| – – from | URL of the voting form. |
| – – ip | Ip-address of the device entering the voting. |
voteMagicPoll
No Preview
POST data information:
| magicID | Id of the Magic Poll in Examinare. |
| Option | Called Number inside the fetchMagicPollSummary (Optional but recommended) |
| Text | Free Text answer. (Optional but recommended) |
| GadgetID | You can define the GadgetID (Freetext) so that you can trace where the vote is comming from. (Optional) |
Return data
This function will return Status = OK on success and Status = Error when an error has occurred.
Phone Surveys
listPhoneSurveys
Return data
This API call will return a multiple XML survey container. XML survey container will contain the information including the surveyID that will be used in your calls to the framework.
Sample Output
<?xml version="1.0" encoding="utf-8"?><response>
<status>Success</status>
<surveys>
<surveyInfo surveyID="1379659109">
<surveyID>1379659109</surveyID>
<surveyName>Outbound Phone Survey</surveyName>
<surveyTaggName></surveyTaggName>
<status>Outbound</status>
<callerIDs>
<callerID>+46188008080</callerID>
<callerID>+46703121234</callerID>
<callerID>+46855926800</callerID>
<callerID>+61865558135</callerID>
<callerID>+6624028269</callerID>
<callerID>+14088894369</callerID>
<callerID>+46840809736</callerID>
</callerIDs>
<completedAnswers>6</completedAnswers>
<stoppedAnswers>0</stoppedAnswers>
<surveyLanguage>sv</surveyLanguage>
</surveyInfo>
<surveyInfo surveyID="1390898671">
<surveyID>1390898671</surveyID>
<surveyName>Inbound Phone Survey</surveyName>
<surveyTaggName></surveyTaggName>
<status>Inbound</status>
<phoneNumbers>
<phoneNumber>
<to>+46188008020</to>
<from>*</from>
</phoneNumber>
</phoneNumbers>
<completedAnswers>9</completedAnswers>
<stoppedAnswers>0</stoppedAnswers>
<surveyLanguage>en</surveyLanguage>
</surveyInfo>
</surveys>
</response>
List all Surveys that has been published as a Phone Survey and status of them.
POST data information:
This function does not need any extra POST data.
Returning Key information
| surveyID | Id of the Survey in Examinare. |
| surveyName | Name of the Phone Survey. |
| surveyTaggName | Tag used in Examinare. |
| status | – Inbound – Outbound |
| callerIDs | Shows only when Outbound and this callerID needs to be sent with the request sendPhoneSurvey. If you need to add another CallerID contact Support Team to authorize it. |
| phoneNumbers | Shows only when Inbound and shows what phone number your Phone Survey is reachable at and what callerID you need to have for it to answer. |
| completedAnswers | Amount of answers on the survey (For the entire Survey). |
| stoppedAnswers | Amount of answers blocked in the survey (For the entire Survey). |
| surveyLanguage | The short code of the language used in the Phone Survey. |
sendPhoneSurvey
No Preview
Make the actual dialing request.
Functionality only works if you have Phone Survey enabled on your account!
Contact Sales to enable.
POST data information:
(Red information is mandatory), all POST data captions are case-sensitive.
| surveyID | Id of the Survey in Examinare. |
| user_* | contactID from the contact information. * needs to be changed into numbers. For example user_1, user_2 etc. |
| callerID | The callerid activated in your account. These can be found in calling listPhoneSurveys. (OPTIONAL) |