Examinare API - 概述
開始使用Examinare調查工具API
如何激活Examinare API的視頻教程
激活Examinare調查工具API
紅色 字段是必填字段,必須有值。 XML數據通過HTTPS作為POST數據發送。
本文件的開頭是可用功能的摘要,之後是更詳細的部分。
所有函數的URL是
https://api.examinare.com/framework
要連接,您需要在 POST 數據中添加三個命令:
apiKey – 這是Examinare在您的帳户中提供的。
apiCompany – 要使用的公司數據庫。
命令 – 您為調用提供的命令。
請注意:您調用的函數可能需要更多命令。
移動 API 和非共享 API 密鑰。
如果您出於任何原因想要保持您的API密鑰私密並使用一種登錄類型的樣式而不是靜態Examinare API密鑰,那麼您可以使用移動API命令 setPhoneID, 此命令可用於獲取移動API令牌,可用於替代靜態API令牌。 所有移動API令牌均可隨時從Examinare帳户內的設置 -> 高級設置中刪除。
PHP 包裝庫
PHP 示例
<?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;
}
}
?>
PHP 包裝庫代碼。
無須下載,也無須閱讀冗長的說明文件。
只需複製並粘貼到您想要的代碼放。
如果您選擇文件名 “examinare-api.php” 然後所有的PHP代碼示例在這個網站上將與url工作.
您需要更新代碼頂部的include語句。 我們的PHP包裝器可在 GitHub. https://github.com/examinare/examinare-php-wrapper
setPhoneID(使用移動 API)
XML示例
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<tokens>
<token>UMOBI:7182101920d9s9f7d8f6d76f7sd8sd98as</token>
<cname>CNAME</cname>
</tokens>
</response>
隨着 setPhoneID 您可以創建自己的 API 密鑰,將連接到您的實時管理用户 Examinare 您需要在您的設備的配置選項卡中激活移動鑰匙功能。 Examinare 帳户。
POST 數據信息:
(紅色信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| apiCompany | 公司ID |
| user | 用户名: |
| pass | 管理員密碼: MD5加密. |
| deviceInformation | 描述 API 連接器設備的可選文本,將顯示在您帳户的 API 令牌列表中。 |
想要在Examinare基礎上構建解決方案?
我們提供開發者帳户,可用於創建沙盒或用於為Examinare API構建外部應用程序,您的客户可以使用Examinare帳户使用您的解決方案。
開發者帳户具有普通帳户的所有功能, 因為它的低價格,你不能使用這些帳户用於商業用途.
調查
clearVotes
沒有預覽
從調查中清除投票。 將刪除在調查中的所有投票,小心使用!
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
返回數據
如果成功,此 API 調用將返回單個狀態信息,否則將返回無法找到調查的錯誤消息。
copySurvey
沒有預覽
複製調查並返回新創建的調查的信息。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| name | 調查名稱(僅顯示在賬户中) |
返回數據
此 API 調用將返回單個 XML 調查容器。 XML 調查容器將包含包括 surveyID 在內的信息,這些信息將用於調用框架。
(見附件二) listSurveys 格式化幫助。
fetchResults
PHP 示例
<?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.*/
?>
示例輸出
XML示例
<?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>
在不過濾背景數據的情況下從調查中獲取結果。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| timestamp1 | 與timestamp2 結合使用以選擇投票之間 2 必須以 UNIX 時間戳的形式。 |
| timestamp2 | UNIX 時間戳。 |
| allowcomments | 將此參數設置為任何返回調查問題上輸入的評論。 |
fetchResultsByInfoReg
示例輸出
XML示例
<?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>
從具有交易 ID 的調查中獲取結果。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| timestamp1 | 與timestamp2 結合使用以選擇投票之間 2 必須以 UNIX 時間戳的形式。 |
| timestamp2 | UNIX 時間戳。 |
| infoReg | 交易ID,在URL中使用跟蹤代碼自動返回時可以收集。 聯繫技術支持以獲取更多信息。 |
啓用通配符 => 應用 * 使用通配符。 例如:Nisse可以是“N*e”
fetchResultsByUser
示例輸出
XML示例
<?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>
使用背景數據過濾從調查中獲取結果。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| timestamp1 | 與timestamp2 結合使用以選擇投票之間 2 必須以 UNIX 時間戳的形式。 |
| timestamp2 | UNIX 時間戳。 |
| contactID | contactID 連接到收件人。 (啓用通配符) |
| 屬於收件人的電子郵件。 (啓用通配符) | |
| group | 屬於收件人的組名稱。 (啓用通配符) |
| title | 屬於收件人的標題。 (啓用通配符) |
| company | 屬於收件人的公司名稱。 (啓用通配符) |
| company-title | 收件人公司名稱。 (啓用通配符) |
| department | 公司內部的部門。 (啓用通配符) |
| customer-group | 客户組。 (啓用通配符) |
| gender | 請參閲客户信息。 |
| address | 地址(啓用通配符) |
| state | 狀態(啓用通配符) |
| country | 國家(啓用通配符) |
| city | 城市(啓用通配符) |
| postal-code | 郵政編碼(啓用通配符) |
啓用通配符 => 應用 * 使用通配符。 例子 : Nisse 可以是 N*e
getRecipientsBasedByResults
沒有預覽
此函數使用與 fetchResultsByUser 相同的輸入資料,並根據輸入條件顯示已作答的收件人。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| timestamp1 | 與timestamp2 結合使用以選擇投票之間 2 必須以 UNIX 時間戳的形式。 |
| timestamp2 | UNIX 時間戳。 |
| contactID | contactID 連接到收件人。 (啓用通配符) |
| 屬於收件人的電子郵件。 (啓用通配符) | |
| group | 屬於收件人的組名稱。 (啓用通配符) |
| title | 屬於收件人的標題。 (啓用通配符) |
| company | 屬於收件人的公司名稱。 (啓用通配符) |
| company-title | 收件人公司名稱。 (啓用通配符) |
| department | 公司內部的部門。 (啓用通配符) |
| customer-group | 客户組。 (啓用通配符) |
| gender | 請參閲客户信息。 |
| address | 地址(啓用通配符) |
| state | 狀態(啓用通配符) |
| country | 國家(啓用通配符) |
| city | 城市(啓用通配符) |
| postal-code | 郵政編碼(啓用通配符) |
啓用通配符 => 應用 * 使用通配符。 例子 : Nisse 可以是 N*e
importSurvey
沒有預覽
將Examinare文件導入到您的帳户。
POST 數據信息:
(紅色信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| examinarexml | Examinare 調查文件(.examinare)的文件內容 |
請注意:我們只建議將預先格式化或翻譯的Examinare調查文件發送到系統。
如果您改變了文件的結構,可能會在使用調查時產生錯誤。 如果您翻譯了文件,請確保使用工具中的翻譯功能。
listSurveys
示例輸出
XML示例
<?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 數據信息:
這個函數不需要任何額外的POST數據。
返回數據
此 API 調用將返回多個 XML 調查容器,XML 調查容器將包含包括 surveyID 在內的信息,這些信息將用於調用框架。
questionsInSurveys
示例輸出
XML示例
<?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>
從調查中檢索所有問題。
POST 數據信息:
(紅色信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
searchFreeText
無代碼預覽
POST 數據信息:
(紅色信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | 您要搜索的調查的 SurveyID |
| Text | 您要搜索的詞組。 啓用通配符 ( * ) 。 |
sendMessageEmail
PHP 示例代碼
PHP 示例
<?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.*/
?>
示例輸出
<?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 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
| delivery_message | 消息將通過電子郵件發送。 最大 220 字符。 |
| delivery_subject | 消息的主題。 |
| rtl | 對阿拉伯語和希伯來語使用 RTL 編碼。 設置 1 表示是,或不設置表示否。 |
| includelogo | 在頂部橫幅中使用徽標。 設置 1 為是或不設置為否。 |
sendMessageSMS
PHP 示例代碼
<?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.*/
?>
示例輸出
<?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 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
| delivery_message | 通過短信發送消息。 最大值 220 字符。 |
| rtl | 對阿拉伯語和希伯來語使用 RTL 編碼。 設置 1 表示是,或不設置表示否。 |
注意: 此消息不包含調查或投票的鏈接。 如果您想添加調查的鏈接,請使用API調用“sendSurvey (SMS ) ” 。
sendSurvey(電子郵件)
PHP 代碼示例
<?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.*/
?>
樣本輸出
<?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 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
| delivery_message | 消息將通過電子郵件發送。 最大 220 字符。 |
| delivery_subject | 消息的主題。 |
| includelogo | 在頂部橫幅中使用徽標。 設置 1 為是或不設置為否。 |
| schedule | 安排此電子郵件以後發送。 必須包含 UNIX 時間戳 |
sendSurvey (SMS)
PHP 代碼示例
<?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.*/
?>
樣本輸出
<?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 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
| delivery_message | 消息將通過短信發送。 |
| delivery_by | 必須設置為 SMS。 |
| schedule | 安排此短信以後發送。 必須包含 UNIX 時間戳 |
updateInstructionText
沒有預覽
根據問卷中的 QuestionNumber 更新說明文字。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | SurveyID;詳情請參閱 listSurveys。 |
| instructionText | 這個問題的新指導文本 . ( 應用|| ! ! 換行 ! | | 而不是換行符) |
| questionNumber | 問題號碼: listSurveys. |
返回數據
此 API 調用將返回一個 XML 響應,如果更新,則返回狀態為 Success,如果調用錯誤,則返回狀態為 error。 將返回列表的結構,請參閲 questionInSurveys 以瞭解更多結構信息。
updateQuestionText
沒有預覽
根據問卷中的 QuestionNumber 更新問題文字。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | SurveyID;詳情請參閱 listSurveys。 |
| questionText | 此調查的新問題 . ( 使用|| ! ! 換行 ! ! || 代替換行) |
| questionNumber | 問題號碼: listSurveys. |
返回數據
此 API 調用將返回一個 XML 響應,如果更新,則返回狀態為 Success,如果調用錯誤,則返回狀態為 error。 將返回列表的結構,請參閲 questionInSurveys 以瞭解更多結構信息。
受益人
addRecipient
返回數據
此 API 調用將返回一個 XML 響應,如果創建了,則返回狀態為 Success,如果調用了錯誤,則返回狀態為 error。 XML 聯繫人容器將包含包括 contactID 在內的信息,這些信息將用於您對框架的調用。
PHP 代碼示例
<?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.*/
?>
樣本輸出
<?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>
將收件人添加到公司數據庫。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| name | 收件人的姓名。 |
| lastname | 收件人的姓氏。 |
| 收件人的電子郵件。 | |
| mobile | 手機號碼。 (格式 00[國家代碼 ] [ 地區代碼 ] [ 電話號碼 ] ) 示例: 00467031234567 |
| group | 集團名稱。 |
| title | 個人頭銜。 |
| company | 公司名稱。 |
| company-title | 收件人的公司名稱。 |
| department | 公司的部門。 |
| customer-group | 客户羣體。 |
| gender | 收件人的性別(男性為男性,女性為女性 ) 。 |
| birth-year | 出生年份(YYYY ) , 僅數字。 |
| birth-month | 出生月份(MM ) , 僅數字。 |
| birth-day | 出生日期(DD ) , 僅數字。 |
| phonenumber | 收件人的電話號碼。 |
| attention | 收件人的注意地址。 |
| address | 收件人的地址。 |
| city | 城市名稱。 |
| state | 國家名稱。 |
| postal-code | 郵政編碼 |
| country | 國家名稱。 |
| crmserial | 來自集成模塊的序列,例如 Zendesk 票據 ID。 |
| extrafieldkey | 下列格式中 extrafields 的鍵。 |
delRecipient
PHP 代碼示例
<?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.*/
?>
刪除公司數據庫中的收件人。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
返回數據
此 API 調用將返回一個 XML 響應,如果刪除,則返回狀態為 Success,如果調用錯誤,則返回狀態為 error。
listRecipientByContactID
返回數據
此 API 調用將返回單個 XML 聯繫人容器。 XML 聯繫人容器將包含包括 contactID 在內的信息,這些信息將用於調用框架(請參閲 addRecipient ) 。
PHP 代碼示例
<?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.*/
?>
使用收件人的 contactID 列出單個收件人的信息。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
listRecipientByCRMSerial
返回數據
此 API 調用將返回單個 XML 聯繫人容器。 XML 聯繫人容器將包含包括聯繫人名稱在內的信息。 contactID 請注意,此調用可以返回多個聯繫人。 (請參閲 addRecipient)
PHP 代碼示例
<?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.*/
?>
使用Examinare擴展中創建的CRM系列的幫助下列出單個收件人的信息。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| crmserial | CRM串行包括插件結構。 檢查收件人屏幕的詳細信息。 |
listRecipientByEmail
返回數據
此 API 調用將返回單個 XML 聯繫人容器。 XML 聯繫人容器將包含包括聯繫人名稱在內的信息。 contactID 請注意,此調用可以返回多個聯繫人。 (請參閲 addRecipient)
PHP 代碼示例
<?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.*/
?>
使用收件人的電子郵件列出單個收件人的信息。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| 從Examinare數據庫中聯繫電子郵件地址。 |
listRecipients
返回數據
此 API 調用將返回多個 XML 聯繫人容器。 XML 聯繫人容器將包含包括以下信息: contactID 將在您調用框架時使用的函數。 (參見 addRecipient)
PHP 代碼示例
<?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.*/
?>
獲取Examinare數據庫中所有收件人的完整列表。
POST 數據信息:
這個函數不需要任何額外的POST數據。
listRecipientsByGroup
返回數據
此 API 調用將返回單個 XML 聯繫人容器。 XML 聯繫人容器將包含包括 contactID 在內的信息,這些信息將用於調用框架(請參閲 addRecipient ) 。
信息,包括將在您調用框架時使用的 contactID。 (參見 addRecipient)
PHP 代碼示例
<?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.*/
?>
按組名列出收件人的信息。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| group | 集團名稱 |
listRecipientsExtraFields
信息,包括將在您調用框架時使用的 contactID。 (參見 addRecipient)
PHP 代碼示例
<?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>
收件人配置文件可以擴展到額外的字段,這些是在添加,加載,更新收件人時發送的。
POST 數據信息:
這個函數不接受任何POST參數。
返回數據
| key | 收件人數據中使用的密鑰。 |
| caption | Examinare設置中的字段標題。 |
| type | 字段類型 , ( 選擇、文本、複選框) |
| options | 使用選擇字段類型時的選項。 |
listRecipientsToSurvey
PHP 代碼示例
<?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.*/
?>
示例輸出
<?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>
列出所有收件人鏈接和Examinare發送邀請的狀態。
請注意: 只有匿名和私人調查可以使用此命令。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
listSurveysByUser
返回數據
此 API 調用將返回多個 XML 調查容器,XML 調查容器將包含包括 surveyID 在內的信息,這些信息將用於調用框架。
PHP 代碼示例
<?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.*/
?>
列出與收件人和狀態相關的所有調查。
POST 數據信息
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
markRecipientsToSurvey
示例輸出
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>MARKED</status>
</report>
</reports>
</response>
在Examinare狀態日誌中將收件人標記為被邀請參加單一調查。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
listSurveysByUser
返回數據
此 API 調用將返回多個 XML 調查容器,XML 調查容器將包含包括 surveyID 在內的信息,這些信息將用於調用框架。
PHP 代碼示例
<?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.*/
?>
樣本輸出
<?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>
列出與收件人和狀態相關的所有調查。
POST 數據信息
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
markRecipientsToSurvey
沒有預覽
在Examinare狀態日誌中將收件人標記為被邀請參加單一調查。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
updateGenderRecipient
返回數據
此 API 調用將返回一個 XML 響應,如果更新,則返回狀態為 Success,如果調用錯誤,則返回狀態為 error。 XML 聯繫人容器將包含包括 contactID 在內的信息,這些信息將用於調用框架(請參閲 addRecipient ) 。
請注意,下方範例適用於 addrecipient,使用更新函數時需要調整。
樣本輸出
XML示例
<?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>
更新單個收件人的性別信息。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
| gender | 收件人的性別(男性為男性,女性為女性 ) 。 |
updateRecipient
返回數據
此 API 調用將返回一個 XML 響應,如果更新了,則返回狀態為 Success,如果調用了錯誤,則返回狀態為 error。 XML 聯繫人容器將包含包括 contactID 在內的信息,這些信息將用於調用框架。 addRecipient)
請注意,下方範例適用於 addrecipient,使用更新函數時需要調整。
樣本輸出
XML示例
<?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>
更新Examinare數據庫中的收件人信息。
POST 數據信息:
(紅色 信息是強制性的,黑色是可選的 ) , 所有的POST數據標題是大小寫敏感的。
| contactID | 來自Examinare數據庫的聯繫人ID。 |
| name | 收件人的姓名。 |
| lastname | 收件人的姓氏。 |
| 收件人的電子郵件。 | |
| mobile | 手機號碼。 (格式 00[國家代碼 ] [ 地區代碼 ] [ 電話號碼 ] ) 示例: 00467031234567 |
| group | 集團名稱。 |
| title | 個人頭銜。 |
| company | 公司名稱。 |
| company-title | 收件人的公司名稱。 |
| department | 公司的部門。 |
| customer-group | 客户羣體。 |
| gender | 收件人的性別(男性為男性,女性為女性 ) 。 |
| birth-year | 出生年份(YYYY ) , 僅數字。 |
| birth-month | 出生月份(MM ) , 僅數字。 |
| birth-day | 出生日期(DD ) , 僅數字。 |
| phonenumber | 收件人的電話號碼。 |
| attention | 收件人的注意地址。 |
| address | 收件人的地址。 |
| city | 城市名稱。 |
| state | 國家名稱。 |
| postal-code | 郵政編碼 |
| country | 國家名稱。 |
| extrafieldkey | 外面的鑰匙 |
調查報告文件
fetchReportFile
PHP 示例
PHP 示例
<?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.*/
?>
樣本輸出
代碼示例
RAW FILE CONTENT
使用來自 fetchReportFileList 的信息從您的帳户中獲取報告。
請注意: 這個函數返回的是帶有頭的實際文件,而不是XML結構。 請確保您升級到最新版本的包裝程序,以便能夠使用PHP包裝程序來執行這個函數。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| reportID | 從函數 fetchReportFileList 獲得的報告的 ID。 |
fetchReportFileList
PHP 示例
PHP 示例
<?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.*/
?>
樣本輸出
XML示例
<?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>
從調查中獲取用於 fetchReportFile 函數的報表列表。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
Magic Polls
fetchMagicPollSummary
樣本報告 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>
樣本報告 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>
<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 數據信息:
這個函數可以與一個可選的POST鍵 magicID 一起使用,當 magicID 被定義時,更詳細的結果會被添加到XML返回中。
返回數據
如果 magicID 未定義(示例返回 1 ) , 此 API 調用將返回多個 XML Magic Poll 容器。
如果定義了 magicID,它將返回更詳細的信息(示例返回 2 ) 。
樣本報告 1
關鍵信息 1
| magicID | 在Examinare的魔術投票的ID。 |
| magicName | 這個問題。 |
| completedAnswers | 在投票中完成的答案。 |
| Options | 如果添加了選項,則顯示投票結果。 如果沒有選項,則此字段為空。 |
| – Number | 投票選項的識別號碼。 |
| – Optiontext | 投票選項的文本 |
| – Result | 投票選項的結果 |
| – Percent | 投票選項相對於完成答案彙總的百分比。 |
樣本報告 2
關鍵信息 2
對於本節中的通用字段,請檢查關鍵信息 1,因為這一部分只處理關鍵信息 1 和 2 之間的差異。
| SMS | 短信投票容器 |
| – Answer | 個人短信回覆容器。 |
| – – id | 這個投票的ID在Examinare. |
| – – when | 以Y-M-D格式顯示的投票日期 |
| – – stamp | 投票的 Unix 時間戳記 |
| – – phrase | 短語已發送。 |
| – – from | 誰發送的電話號碼。 |
| Web | 網頁投票的容器 |
| – Answer | 單個 Web 投票的容器。 |
| – – id | 這個投票的ID在Examinare. |
| – – when | 以Y-M-D格式顯示的投票日期 |
| – – stamp | 投票的 Unix 時間戳記 |
| – – phrase | 短語已發送。 |
| – – from | 投票表格的URL。 |
| – – ip | 進入投票的設備的IP地址。 |
voteMagicPoll
沒有預覽
POST 數據信息:
| magicID | 在Examinare的魔術投票的ID。 |
| Option | fetchMagicPollSummary 中的調用數(可選,但建議) |
| Text | 自由文本回答。 (可選,但建議) |
| GadgetID | 您可以定義 GadgetID(自由文本 ) , 以便您可以追蹤投票來自哪裏。 (可選) |
返回數據
此函數在成功時傳回 Status = OK,發生錯誤時傳回 Status = Error。
Phone Surveys
listPhoneSurveys
返回數據
此 API 調用將返回多個 XML 調查容器,XML 調查容器將包含包括 surveyID 在內的信息,這些信息將用於調用框架。
樣本輸出
<?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>
列出已作為電話調查發佈的所有調查及其狀態。
POST 數據信息:
這個函數不需要任何額外的POST數據。
關鍵信息
| surveyID | Examinare中的調查ID。 |
| surveyName | 電話調查的名稱。 |
| surveyTaggName | Examinare中使用的標籤。 |
| status | – 入境 – 出境 |
| callerIDs | 僅在 Outbound 和 this 時顯示 callerID 需要與請求一起發送 sendPhoneSurvey. 如果你需要添加另一個 CallerID 聯繫支持團隊授權它。 |
| phoneNumbers | 僅顯示入站時,並顯示您的電話調查可聯繫的電話號碼以及 callerID 你需要有它來回答。 |
| completedAnswers | 調查答覆數量(整個調查 ) 。 |
| stoppedAnswers | 調查中被阻止的答覆數量(整個調查 ) 。 |
| surveyLanguage | 電話調查中使用的語言的簡碼。 |
sendPhoneSurvey
沒有預覽
提出實際撥號請求。
只有在您的帳户中啓用了電話調查時,該功能才能正常工作!
聯繫銷售部門以啓用。
POST 數據信息:
(紅色 信息是強制性的 ) , 所有的POST數據標題是大小寫敏感的。
| surveyID | Examinare中的調查ID。 |
| 用户_* | contactID 從聯繫人信息。 * 需要改為數字。 例如 user_1, user_2 等。 |
| callerID | 在您的帳户中激活的callerid。 這些可以在呼叫中找到 listPhoneSurveys. (非強制性) |