Phương tiện liên quan tới Examinare API
Bắt đầu với Công cụ khảo sát Examinare API
Video hướng dẫn về cách kích hoạt Examinare API
Chạy API công cụ khảo sát Examinare
Đỏ Các trường là yêu cầu và phải có giá trị. Dữ liệu XML được gửi sử dụng HTTPS như dữ liệu POST.
Ở đầu của tài liệu này có một tóm tắt các hàm có sẵn. Sau đó là một phần chi tiết hơn.
URL cho tất cả các hàm là
https://api.examinare.com/framework
Để kết nối, bạn cần thêm ba lệnh vào dữ liệu POST:
apiKey – Điều này được Examinare cung cấp trong tài khoản của bạn.
apiCompany – Cơ sở dữ liệu công ty cần sử dụng.
Command – Lệnh bạn cung cấp cho cuộc gọi.
Ghi chú: Có thể cần nhiều lệnh hơn bởi hàm bạn gọi.
Mobile API và khóa API không chia sẻ.
Nếu vì bất kỳ lý do nào bạn muốn giữ khóa API riêng tư và sử dụng kiểu đăng nhập của Style thay vì khóa API Examinare tĩnh thì bạn có thể sử dụng lệnh Mobile API setPhoneID, lệnh này có thể dùng để lấy một token API di động có thể dùng thay cho token API tĩnh. Tất cả token API di động có thể bị xóa bất cứ lúc nào từ tài khoản Examinare của bạn trong Settings -> Advanced Settings.
Thư viện PHP Wrapper
Ví dụ 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;
}
}
?>
Mã thư viện PHP Wrapper.
Không tải xuống hay tập tin readme dài.
Chỉ cần sao chép và dán vào nơi bạn muốn mã được đặt.
Nếu bạn chọn tên tập tin “examinare-api.php” thì tất cả các ví dụ mã PHP trên trang này sẽ hoạt động với các URL.
Nếu không, bạn cần cập nhật mã của bạn include statement ở trên cùng. Phần mềm PHP của chúng tôi có sẵn trên GitHub. https://github.com/examinare/examinare-php-wrapper
setPhoneID (dùng API di động)
Ví dụ XML
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<tokens>
<token>UMOBI:7182101920d9s9f7d8f6d76f7sd8sd98as</token>
<cname>CNAME</cname>
</tokens>
</response>
Với setPhoneID bạn có thể tạo khóa API của riêng mình sẽ được kết nối với một người dùng quản lý trực tiếp trong tài khoản Examinare của bạn. Bạn cần kích hoạt chức năng Mobile Keys trong thẻ Cấu hình trong tài khoản Examinare của bạn.
Thông tin dữ liệu POST:
(Thông tin màu đỏ là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| apiCompany | Số ID công ty |
| user | Tên người dùng quản trị viên |
| pass | Mật khẩu quản trị viên Mã hóa MD5. |
| deviceInformation | Văn bản tùy chọn để mô tả thiết bị kết nối API. Sẽ được hiển thị trong danh sách token API trong tài khoản của bạn. |
Bạn muốn xây dựng các giải pháp dựa trên Examinare?
Chúng tôi cung cấp một tài khoản phát triển có thể được sử dụng để tạo Sandbox hoặc sử dụng để xây dựng các ứng dụng bên ngoài cho API Examinare nơi khách hàng của bạn có thể sử dụng giải pháp của bạn với tài khoản Examinare của họ.
Tài khoản phát triển có tất cả các chức năng của một tài khoản thông thường, vì giá thấp của nó bạn không thể sử dụng các tài khoản này cho mục đích thương mại.
99 đô-la.
- Trả lời, bình chọn và người nhận không giới hạn
- Công bố 1 cuộc thăm dò cùng một lúc
- Thư viện mẫu sẵn sàng
- Chỉ hỗ trợ thư điện tử
- Đăng ký hàng năm
- Examinare Truy cập API
- Không dùng thương mại
Kiểm tra
clearVotes
Không xem thử
Dọn dẹp các phiếu bầu từ một cuộc thăm dò. Sẽ xóa tất cả phiếu bầu trong một cuộc thăm dò, dùng cẩn thận!
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
Dữ liệu trở lại
Việc gọi API này sẽ trả về một thông tin trạng thái đơn lẻ nếu thành công nếu không một thông điệp lỗi rằng cuộc khảo sát không thể tìm thấy.
copySurvey
Không xem thử
Sao chép một cuộc khảo sát và trả về thông tin của cuộc khảo sát mới tạo.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| name | Tên của cuộc thăm dò (Chỉ được hiển thị trong Tài khoản) |
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container khảo sát XML đơn. XML survey container sẽ chứa thông tin bao gồm surveyID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
(Xem listSurveys để giúp định dạng.)
fetchResults
Ví dụ 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.*/
?>
Đầu ra ví dụ
Ví dụ 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>
Lấy kết quả từ cuộc khảo sát mà không lọc dữ liệu nền.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| timestamp1 | Dùng kết hợp với timestamp2 để chọn phiếu bầu giữa 2 ngày. Cần phải có dạng dấu thời gian UNIX. |
| timestamp2 | Dấu thời gian UNIX. |
| allowcomments | Đặt tham số này cho bất kỳ cái gì trả về lời bình về câu hỏi khảo sát. |
fetchResultsByInfoReg
Đầu ra ví dụ
Ví dụ 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>
Lấy kết quả từ cuộc khảo sát với ID giao dịch.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| timestamp1 | Dùng kết hợp với timestamp2 để chọn phiếu bầu giữa 2 ngày. Cần phải có dạng dấu thời gian UNIX. |
| timestamp2 | Dấu thời gian UNIX. |
| infoReg | Transaction ID, có thể được thu thập khi sử dụng tự động trở lại với tracecode trong URL. Liên hệ hỗ trợ kỹ thuật để biết thêm thông tin. |
Wildcard enabled => Apply * to use Wildcard. Ví dụ: Nisse có thể là “N*e”
fetchResultsByUser
Đầu ra ví dụ
Ví dụ 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>
Lấy kết quả từ cuộc khảo sát với bộ lọc dữ liệu nền.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| timestamp1 | Dùng kết hợp với timestamp2 để chọn phiếu bầu giữa 2 ngày. Cần phải có dạng dấu thời gian UNIX. |
| timestamp2 | Dấu thời gian UNIX. |
| contactID | contactID kết nối với người nhận. (Đã bật wildcard) |
| Thư điện tử thuộc về người nhận. (Bật ký tự đại diện) | |
| group | Tên nhóm thuộc về người nhận. |
| title | Tựa đề thuộc về người nhận. (Bật dấu khoá) |
| company | Tên công ty thuộc về người nhận. (Bật ký tự đại diện) |
| company-title | Tên công ty của người nhận. |
| department | Bộ phận trong công ty. |
| customer-group | Nhóm khách hàng. (Bật ký tự đại diện) |
| gender | Xem thông tin khách hàng. |
| address | Địa chỉ (bật ký tự đại diện) |
| state | Tình trạng (đã bật ký tự đại diện) |
| country | Quốc gia (đã bật ký tự đại diện) |
| city | Thành phố (đã bật ký tự đại diện) |
| postal-code | Mã bưu điện (bật ký tự đại diện) |
Wildcard enabled => Apply * to use Wildcard. Ví dụ: Nisse có thể là N*e
getRecipientsBasedByResults
Không xem thử
Hàm này sử dụng cùng dữ liệu indata như fetchResultsByUser và hiển thị những người nhận đã trả lời dựa trên dữ liệu in.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| timestamp1 | Dùng kết hợp với timestamp2 để chọn phiếu bầu giữa 2 ngày. Cần phải có dạng dấu thời gian UNIX. |
| timestamp2 | Dấu thời gian UNIX. |
| contactID | contactID kết nối với người nhận. (Đã bật wildcard) |
| Thư điện tử thuộc về người nhận. (Bật ký tự đại diện) | |
| group | Tên nhóm thuộc về người nhận. |
| title | Tựa đề thuộc về người nhận. (Bật dấu khoá) |
| company | Tên công ty thuộc về người nhận. (Bật ký tự đại diện) |
| company-title | Tên công ty của người nhận. |
| department | Bộ phận trong công ty. |
| customer-group | Nhóm khách hàng. (Bật ký tự đại diện) |
| gender | Xem thông tin khách hàng. |
| address | Địa chỉ (bật ký tự đại diện) |
| state | Tình trạng (đã bật ký tự đại diện) |
| country | Quốc gia (đã bật ký tự đại diện) |
| city | Thành phố (đã bật ký tự đại diện) |
| postal-code | Mã bưu điện (bật ký tự đại diện) |
Wildcard enabled => Apply * to use Wildcard. Ví dụ: Nisse có thể là N*e
importSurvey
Không xem thử
Nhập tập tin Examinare vào tài khoản.
Thông tin dữ liệu POST:
(Thông tin màu đỏ là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| examinarexml | Dữ liệu liên quan tới Examinare survey file (.examinare) tại Wikispecies |
Xin lưu ý: Chúng tôi chỉ khuyến cáo gửi một tập tin khảo sát Examinare đã định dạng hoặc dịch sang hệ thống.
Nếu bạn thay đổi cấu trúc của tập tin, nó có thể tạo ra lỗi khi sử dụng khảo sát. Nếu bạn dịch tập tin, hãy chắc chắn rằng bạn sử dụng chức năng dịch bên trong công cụ.
listSurveys
Đầu ra ví dụ
Ví dụ 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>
Thông tin dữ liệu POST:
Hàm này không cần bất kỳ dữ liệu POST nào.
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container khảo sát đa XML. XML survey container sẽ chứa thông tin bao gồm surveyID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
questionsInSurveys
Đầu ra ví dụ
Ví dụ 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>
Lấy tất cả các câu hỏi từ một cuộc khảo sát.
Thông tin dữ liệu POST:
(Thông tin màu đỏ là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
searchFreeText
Không xem thử mã
Thông tin dữ liệu POST:
(Thông tin màu đỏ là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | SurveyID của cuộc thăm dò bạn muốn tìm kiếm |
| Text | Cụm từ bạn muốn tìm. Đã bật ký tự đại diện (*). |
sendMessageEmail
Mã ví dụ PHP
Ví dụ 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.*/
?>
Đầu ra ví dụ
<?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>
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
| delivery_message | Thông điệp sẽ được gửi bằng Email. Tối đa 220 ký tự. |
| delivery_subject | Tiêu đề của thông điệp. |
| rtl | Dùng mã hóa RTL cho tiếng Ả Rập và Hebrew. Đặt 1 cho yes hoặc không đặt cho no. |
| includelogo | Dùng logo trong cờ trên cùng. Đặt 1 cho yes hoặc không đặt cho no. |
sendMessageSMS
Mã ví dụ 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.*/
?>
Đầu ra ví dụ
<?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>
Gửi tin nhắn SMS đến người nhận.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
| delivery_message | Thông điệp sẽ được gửi qua SMS. Tối đa 220 ký tự. |
| rtl | Dùng mã hóa RTL cho tiếng Ả Rập và Hebrew. Đặt 1 cho yes hoặc không đặt cho no. |
Ghi chú: Thông điệp này sẽ không có liên kết đến một cuộc khảo sát hay một cuộc bỏ phiếu. Nếu bạn muốn thêm một liên kết đến một cuộc khảo sát, hãy sử dụng cuộc gọi API có tên là “sendSurvey (SMS)”.
sendSurvey (Email)
Ví dụ mã 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.*/
?>
Đầu ra mẫu
<?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>
Gửi lời mời bằng email đến người nhận.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
| delivery_message | Thông điệp sẽ được gửi bằng Email. Tối đa 220 ký tự. |
| delivery_subject | Tiêu đề của thông điệp. |
| includelogo | Dùng logo trong cờ trên cùng. Đặt 1 cho yes hoặc không đặt cho no. |
| schedule | Lập kế hoạch gửi thư này sau. Phải chứa dấu thời gian UNIX |
sendSurvey (SMS)
Ví dụ mã 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.*/
?>
Đầu ra mẫu
<?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>
Gửi lời mời SMS đến người nhận.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
| delivery_message | Thông điệp sẽ được gửi qua SMS. |
| delivery_by | Phải được thiết lập là SMS. |
| schedule | Lập kế hoạch gửi tin nhắn này sau. Phải chứa dấu thời gian UNIX |
updateInstructionText
Không xem thử
Cập nhật văn bản hướng dẫn với QuestionNumber trong Survey.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | SurveyID, xem listSurveys để biết thêm thông tin |
| instructionText | Văn bản hướng dẫn mới cho câu hỏi này. (Apply ||!linebreak!|| instead of linebreaks) |
| questionNumber | Số câu hỏi được tìm thấy trong listSurveys. |
Dữ liệu trở lại
Việc gọi API này sẽ trả về một phản hồi XML với trạng thái Success nếu nó được cập nhật, lỗi nếu một lỗi đã được gọi. Cấu trúc danh sách sẽ được trả lại, xem questionInSurveys để biết thêm thông tin về cấu trúc.
updateQuestionText
Không xem thử
Cập nhật văn bản câu hỏi với QuestionNumber trong Survey.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | SurveyID, xem listSurveys để biết thêm thông tin |
| questionText | Câu hỏi mới trong khảo sát này. (Dùng ||!linebreak!|| thay cho ký tự xuống dòng) |
| questionNumber | Số câu hỏi được tìm thấy trong listSurveys. |
Dữ liệu trở lại
Việc gọi API này sẽ trả về một phản hồi XML với trạng thái Success nếu nó được cập nhật, lỗi nếu một lỗi đã được gọi. Cấu trúc danh sách sẽ được trả lại, xem questionInSurveys để biết thêm thông tin về cấu trúc.
Người nhận
addRecipient
Dữ liệu trở lại
Việc gọi API này sẽ trả lại một phản hồi XML với trạng thái Success nếu nó được tạo ra, lỗi nếu một lỗi đã được gọi. Hộp chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
Ví dụ mã 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.*/
?>
Đầu ra mẫu
<?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>
Thêm người nhận vào cơ sở dữ liệu công ty.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| name | Tên của người nhận. |
| lastname | Họ của người nhận. |
| Thư điện tử của người nhận | |
| mobile | Số điện thoại di động. (Định dạng 00[Mã quốc gia][Mã vùng][Số điện thoại]) Ví dụ: 00467031234567 |
| group | Tên nhóm. |
| title | Danh hiệu cá nhân. |
| company | Tên công ty. |
| company-title | Tên công ty của người nhận. |
| department | Bộ phận trong Công ty. |
| customer-group | Nhóm khách hàng. |
| gender | Giới tính của người nhận. (nam cho Nam, nữ cho Nữ). |
| birth-year | Năm sinh (YYYY), chỉ số. |
| birth-month | Tháng sinh (MM), chỉ số. |
| birth-day | Ngày sinh (DD), chỉ số. |
| phonenumber | Số điện thoại của người nhận. |
| attention | Địa chỉ của người nhận. |
| address | Địa chỉ của người nhận. |
| city | Thành phố. |
| state | Tên bang. |
| postal-code | Mã bưu điện. |
| country | Tên quốc gia. |
| crmserial | Mã từ mô-đun tích hợp cho ex. Mã số vé Zendesk. |
| extrafieldkey | Khóa từ các trường phụ theo định dạng dưới đây. |
delRecipient
Ví dụ mã 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.*/
?>
Xoá người nhận trong cơ sở dữ liệu công ty.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
Dữ liệu trở lại
Việc gọi API này sẽ trả lại một phản hồi XML với trạng thái Success nếu nó bị xóa, lỗi nếu lỗi đã được gọi.
listRecipientByContactID
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container liên hệ XML đơn. Hộp chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Ví dụ mã 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.*/
?>
Danh sách thông tin của một người nhận duy nhất sử dụng contactID của người nhận.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
listRecipientByCRMSerial
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container liên hệ XML đơn. XML contact container sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn đến khung. Ghi chú, cuộc gọi này có thể trả lại nhiều liên hệ. (Xem addRecipient)
Ví dụ mã 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.*/
?>
Danh sách thông tin của một người nhận duy nhất với sự giúp đỡ của CRM Serial được tạo ra trong các phần mở rộng Examinare có sẵn.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| crmserial | Crm Serial bao gồm cấu trúc plugin. Kiểm tra màn hình người nhận để biết chi tiết. |
listRecipientByEmail
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container liên hệ XML đơn. XML contact container sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn đến khung. Ghi chú, cuộc gọi này có thể trả lại nhiều liên hệ. (Xem addRecipient)
Ví dụ mã 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.*/
?>
Danh sách thông tin của một người nhận duy nhất sử dụng email của người nhận.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| Địa chỉ Email liên lạc từ cơ sở dữ liệu Examinare của bạn. |
listRecipients
Dữ liệu trở lại
Việc gọi API này sẽ trả lại một hộp chứa liên hệ đa XML. Hộp chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Ví dụ mã 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.*/
?>
Lấy danh sách đầy đủ của tất cả những người nhận trong cơ sở dữ liệu Examinare của bạn.
Thông tin dữ liệu POST:
Hàm này không cần bất kỳ dữ liệu POST nào.
listRecipientsByGroup
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container liên hệ XML đơn. Hộp chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Ví dụ mã 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.*/
?>
Danh sách thông tin của người nhận theo tên nhóm.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| group | Tên nhóm |
listRecipientsExtraFields
thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Ví dụ mã 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>
Thông tin cá nhân của người nhận có thể được mở rộng với Extra Fields và chúng được gửi khi thêm, tải, cập nhật người nhận.
Thông tin dữ liệu POST:
Hàm này không có tham số POST.
Dữ liệu trở lại
| key | Khóa dùng trong dữ liệu người nhận. |
| caption | Tên của trường từ Examinare Settings. |
| type | Kiểu trường, (chọn, văn bản, hộp chọn) |
| options | Tùy chọn khi sử dụng kiểu trường chọn. |
listRecipientsToSurvey
Ví dụ mã 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.*/
?>
Đầu ra ví dụ
<?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>
Danh sách tất cả các liên kết người nhận và trạng thái của các lời mời được gửi từ Examinare.
Ghi chú: Chỉ có khảo sát ẩn danh và riêng có thể được sử dụng với lệnh này.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
listSurveysByUser
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container khảo sát đa XML. XML survey container sẽ chứa thông tin bao gồm surveyID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
Ví dụ mã 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.*/
?>
Danh sách tất cả các cuộc khảo sát kết nối với người nhận và trạng thái.
Thông tin dữ liệu POST
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
markRecipientsToSurvey
Đầu ra ví dụ
<?xml version="1.0" encoding="utf-8"?>
<response>
<status>Success</status>
<reports>
<report>
<contactID>UA1317237650U4e8373923c16b</contactID>
<status>MARKED</status>
</report>
</reports>
</response>
Đánh dấu người nhận như được mời đến một cuộc khảo sát duy nhất trong bản ghi trạng thái Examinare.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
listSurveysByUser
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container khảo sát đa XML. XML survey container sẽ chứa thông tin bao gồm surveyID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
Ví dụ mã 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.*/
?>
Đầu ra mẫu
<?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>
Danh sách tất cả các cuộc khảo sát kết nối với người nhận và trạng thái.
Thông tin dữ liệu POST
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
markRecipientsToSurvey
Không xem thử
Đánh dấu người nhận như được mời đến một cuộc khảo sát duy nhất trong bản ghi trạng thái Examinare.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
updateGenderRecipient
Dữ liệu trở lại
Việc gọi API này sẽ trả về một phản hồi XML với trạng thái Success nếu nó được cập nhật, lỗi nếu một lỗi đã được gọi. Hộp chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Xin lưu ý rằng ví dụ dưới đây là cho addrecipient và cần được điều chỉnh để sử dụng hàm cập nhật.
Đầu ra mẫu
Ví dụ 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>
Cập nhật thông tin giới tính cho một người nhận duy nhất.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
| gender | Giới tính của người nhận. (nam cho Nam, nữ cho Nữ). |
updateRecipient
Dữ liệu trở lại
Việc gọi API này sẽ trả về một phản hồi XML với trạng thái Success nếu nó được cập nhật, lỗi nếu một lỗi đã được gọi. Bộ chứa liên hệ XML sẽ chứa thông tin bao gồm contactID sẽ được sử dụng trong các cuộc gọi của bạn tới khung. (Xem addRecipient)
Xin lưu ý rằng ví dụ dưới đây là cho addrecipient và cần được điều chỉnh để sử dụng hàm cập nhật.
Đầu ra mẫu
Ví dụ 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>
Cập nhật thông tin người nhận trong cơ sở dữ liệu Examinare.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc, màu đen là tùy chọn), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| contactID | Mã liên lạc từ cơ sở dữ liệu Examinare của anh. |
| name | Tên của người nhận. |
| lastname | Họ của người nhận. |
| Thư điện tử của người nhận | |
| mobile | Số điện thoại di động. (Định dạng 00[Mã quốc gia][Mã vùng][Số điện thoại]) Ví dụ: 00467031234567 |
| group | Tên nhóm. |
| title | Danh hiệu cá nhân. |
| company | Tên công ty. |
| company-title | Tên công ty của người nhận. |
| department | Bộ phận trong Công ty. |
| customer-group | Nhóm khách hàng. |
| gender | Giới tính của người nhận. (nam cho Nam, nữ cho Nữ). |
| birth-year | Năm sinh (YYYY), chỉ số. |
| birth-month | Tháng sinh (MM), chỉ số. |
| birth-day | Ngày sinh (DD), chỉ số. |
| phonenumber | Số điện thoại của người nhận. |
| attention | Địa chỉ của người nhận. |
| address | Địa chỉ của người nhận. |
| city | Thành phố. |
| state | Tên bang. |
| postal-code | Mã bưu điện. |
| country | Tên quốc gia. |
| extrafieldkey | Chìa khóa từ ngoài sân. |
Tập tin báo cáo khảo sát
fetchReportFile
Ví dụ PHP
Ví dụ 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.*/
?>
Đầu ra mẫu
Ví dụ mã
RAW FILE CONTENT
Lấy một báo cáo từ tài khoản của bạn với thông tin từ fetchReportFileList.
Hãy chú ý: hàm này trả về tập tin thực với đầu và không phải là một cấu trúc XML. Hãy chắc chắn rằng bạn đã nâng cấp bộ phận bọc lên phiên bản mới nhất để có thể sử dụng bộ phận bọc PHP cho hàm này.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| reportID | ID của báo cáo từ hàm fetchReportFileList. |
fetchReportFileList
Ví dụ PHP
Ví dụ 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.*/
?>
Đầu ra mẫu
Ví dụ 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>
Lấy danh sách báo cáo từ Khảo sát để dùng với hàm fetchReportFile.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
Magic Polls
fetchMagicPollSummary
Trả mẫu 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>
Trả mẫu 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>
Thông tin dữ liệu POST:
Hàm này có thể được sử dụng với một chìa khóa POST tùy chọn gọi là magicID. Khi magicID được định nghĩa, kết quả chi tiết hơn được thêm vào XML trở lại.
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container Magic Poll XML đa nếu magicID không được định nghĩa (Sample return 1).
Nếu magicID được định nghĩa nó sẽ trả về thông tin chi tiết hơn (Sample return 2).
Trả mẫu 1
Thông tin khóa 1
| magicID | Id of the Magic Poll trong Examinare. |
| magicName | Câu hỏi được đặt ra. |
| completedAnswers | Câu trả lời hoàn thành trong cuộc thăm dò. |
| Options | Các tùy chọn với kết quả từ cuộc thăm dò. Nếu thêm Tùy chọn. Nếu không có tùy chọn thì trường này rỗng. |
| – Number | Số nhận dạng của tùy chọn Polls. |
| – Optiontext | Văn bản của tùy chọn phiếu bầu |
| – Result | Kết quả của tùy chọn phiếu bầu |
| – Percent | Tỷ lệ phần trăm của tùy chọn phiếu bầu so với tóm tắt câu trả lời hoàn thành. |
Trả mẫu 2
Thông tin khóa 2
Đối với các trường chung trong phần này, hãy kiểm tra Thông tin khóa 1 vì phần này chỉ xử lý sự khác biệt giữa Thông tin khóa 1 và 2.
| SMS | Bộ chứa cho phiếu SMS |
| – Answer | Hộp chứa cho câu trả lời SMS cá nhân. |
| – – id | ID của cuộc bỏ phiếu này trong Examinare. |
| – – when | Ngày bầu cử theo định dạng Y- M- D Thời gian |
| – – stamp | Unix Time stamp of the vote |
| – – phrase | Cụm từ đã gửi. |
| – – from | Số điện thoại của người gửi nó. |
| Web | Hộp chứa cho phiếu bầu mạngName |
| – Answer | Vùng chứa dữ liệu cho từng lượt bình chọn trên web. |
| – – id | ID của cuộc bỏ phiếu này trong Examinare. |
| – – when | Ngày bầu cử theo định dạng Y- M- D Thời gian |
| – – stamp | Unix Time stamp of the vote |
| – – phrase | Cụm từ đã gửi. |
| – – from | URL của biểu mẫu bình chọn. |
| – – ip | Địa chỉ IP của thiết bị tham gia bầu cử. |
voteMagicPoll
Không xem thử
Thông tin dữ liệu POST:
| magicID | Id of the Magic Poll trong Examinare. |
| Option | Số gọi bên trong fetchMagicPollSummary (Tùy chọn nhưng khuyến nghị) |
| Text | Trả lời văn bản tự do. (Tùy chọn nhưng khuyến nghị) |
| GadgetID | Bạn có thể xác định GadgetID (text tự do) để có thể theo dõi nơi mà phiếu bầu đến từ. (Tùy chọn) |
Dữ liệu trở lại
Hàm này sẽ trả lại Status = OK khi thành công và Status = Error khi lỗi xảy ra.
Phone Surveys
listPhoneSurveys
Dữ liệu trở lại
Việc gọi API này sẽ trả về một container khảo sát đa XML. XML survey container sẽ chứa thông tin bao gồm surveyID sẽ được sử dụng trong các cuộc gọi của bạn đến khung.
Đầu ra mẫu
<?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>
Danh sách tất cả các cuộc khảo sát đã được công bố như một cuộc khảo sát điện thoại và tình trạng của chúng.
Thông tin dữ liệu POST:
Hàm này không cần bất kỳ dữ liệu POST nào.
Đang trả lại thông tin khóa
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| surveyName | Tên của cuộc khảo sát điện thoại. |
| surveyTaggName | Tag dùng trong Examinare. |
| status | – Đang vào – Đang ra |
| callerIDs | Chỉ hiển thị khi ra và đây callerID cần phải gửi cùng với yêu cầu sendPhoneSurvey. Nếu anh cần thêm một cái nữa CallerID liên hệ với đội hỗ trợ để xác nhận. |
| phoneNumbers | Chỉ hiển thị khi nhập và hiển thị số điện thoại mà cuộc khảo sát điện thoại của bạn có thể liên lạc và callerID Anh cần phải có nó để trả lời. |
| completedAnswers | Số lượng câu trả lời trong cuộc khảo sát (cho toàn bộ cuộc khảo sát). |
| stoppedAnswers | Số lượng câu trả lời bị chặn trong cuộc khảo sát (cho toàn bộ cuộc khảo sát). |
| surveyLanguage | Mã ngắn của ngôn ngữ được sử dụng trong cuộc khảo sát điện thoại. |
sendPhoneSurvey
Không xem thử
Làm yêu cầu gọi thực tế.
Chức năng này chỉ hoạt động nếu bạn đã bật khảo sát điện thoại trên tài khoản của bạn!
Liên hệ với Sales để kích hoạt.
Thông tin dữ liệu POST:
(Đỏ thông tin là bắt buộc), tất cả các tiêu đề dữ liệu POST là phân biệt chữ cái.
| surveyID | Id of the Survey in Examinare (bằng tiếng Anh). |
| người dùng_ * | contactID từ thông tin liên lạc. * cần phải thay đổi thành số. Ví dụ user_1, user_2 v.v. |
| callerID | Callerid đã được kích hoạt trong tài khoản của anh. Điều này có thể được tìm thấy trong listPhoneSurveys gọi. (CHO THỂ) |