campaignSmsNew - create a new SMS-campaign

campaignSmsNew (string ApiKey, array int list_id, string title, string message, string senderName, bool isTransactional)

Method create a new SMS-campaign.

Parameters
apikey API key to access to your account
list_id

Id of campaign obtained by campaignGetAll — for a particular list, or multiple values ​​separated by commas (for paid users).

title Name of campaign
message The content of message
senderName Alphaname (name of the sms-sender)
isTransactional Type of sms-campaign: normal or transactional (true / false)
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form:
http://api.feedgee.com/1.0/campaignSmsNew?apikey=APIKEY&list_id=LIST_IDS&title=TITLE&message=MESSAGE&senderName= SENDERNAME&isTransactional=(TRUE/FALSE)

The return value: data of created campaign
success Value 1 if success, 0 if error
errors The number of successful requests
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with a se on schedule campaign
SmsCampaign Array with data of campaign
id Number of campaign
title Name of campaign
senderName Alphaname (name of the sms-sender)
maillist_id Array with numbers of lists, on which campaign sent
int Number of list
count_sms Number of sms, needed to send
count_subscribers Number of subscribers in the campaign
message Content of sms
status Status of campaign
isTransactonal Transactional campaign
isPublic Public campaign
create Date and time of the created campaign
schedule Schedule time of sending a sms-campaign

Example (XML)

<ResultOfCampaign>
<success>int</success>
<errors>int</errors>
<code>int</code>
<warning>string</warning>
<data>
<SmsCampaign>
<id>int</id>
<title>string</title>
<senderName>string</senderName>
<maillist_id>string</maillist_id>
<count_sms>string</count_sms>
<count_subscribers>string</count_subscribers>
<message>string</message>
<status>string</status>
<isTransactional>string</isTransactional>
<isPublic>string</isPublic>
<create>string</create>
</SmsCampaign>
</data>
</ResultOfSmsCampaign>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"warning":"",
"data":
[{"id":int,
"title":"string",
"senderName":"string",
"maillist_id":[int],
"count_sms": int,
"count_subscribers":int;
"message":"string",
"status":"string",
"isTransactonal": boolean,
"isPublic": boolean,
"create":datetime,
"schedule":datetime
}]
}

Request in PHP

<?
//Your key to access the API
$api_key="00000000000000000000000000000000";
//Method name
$method="campaignSmsNew";
echo"Method:".$method."<br>";
//parameters
$list_id="0001";
$subject="test";
$html=urlencode("<html>test</html>");
$parameters="apikey=$api_key&list_id=$list_ids&title=$title&message=$message
&senderNames=$senderNames&isTransactional=$isTransactonal";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
//echo$result;
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
if(!empty($jsonObj->error)){
//Error of get the list of subscribers
echo"Anerroroccured:".$jsonObj->error;}
//Display the names and values
echo"Here'salistofyourdata:<br>";
data_output($jsonObj->data);
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
//Displays data from indented
functiondata_output($obj,$level=0){
if(is_array($obj)||is_object($obj)){
if(is_object($obj)){
$obj=(array)$obj;
}
echocount($obj)>1?"<br/>n":"";
foreach($objas$key=>$value){
//itwasobject
if(!is_numeric($key)){
$prefix=str_repeat(" ",$level-1);
echo$prefix.$key.":";
}
data_output($value,$level+1);
}
}
else{
$prefix=" ";
if($obj===false)$obj='false';
echo$prefix.$obj."<br/>n";
}
}
?>

SOAP request

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:campaignSmsNew>
<tem:apikey>string</tem:apikey>
<tem:list_id>string</tem:list_id>
<tem:title>string</tem:title>
<tem:message>string</tem:message>
<tem:senderNames>string</tem:senderNames>
<tem:isTransactional>string</tem:isTransactional>
</tem:campaignSmsNew>
</soapenv:Body>
</soapenv:Envelope>

campaignSmsSendNow - send a SMS-campaign

campaignSmsSendNow (string ApiKey, int campaign_Id)

Method send earlier created SMS-campaign.

Parameters
apikey API key to access to your account
campaign_Id Id of campaign obtained by campaignSmsNew
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/campaignSmsSendNow?apikey=API_KEY&campaign_Id=CAMPAIGN_ID

The return value: data of sent campaign
success Value 1 if success, 0 if error
errors The number of successful requests
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with set on schedule campaign
SmsCampaign Array with data of campaign
id Number of campaign
title Name of campaign
senderName Alphaname (name of the sms-sender)
maillist_id Array with numbers of lists, on which campaign sent
int Number of list
count_sms Number of sms, needed to send
count_subscribers Number of subscribers in the campaign
message Content of sms
status Status of campaign
isTransactonal Transactional campaign
isPublic Public campaign
create Date and time of the created campaign
schedule Schedule time of sending a sms-campaign

Example (XML)

<ResultOfSmsCampaign>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<SmsCampaign>
<id>int</id>
<title>string</title>
<senderName>string</senderName>
<maillist_id>string</maillist_id>
<count_sms>string</count_sms>
<count_subscribers>string</count_subscribers>
<message>int</message>
<status>string</status>
<isTransactional>string</isTransactional>
<isPublic>string</isPublic>
<create>string</create>
<schedule>string</schedule>
</SmsCampaign>
</data>
</ResultOfSmsCampaign>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"warning":"",
"data":
[{"id":int,
"title":"string",
"senderName":"string",
"maillist_id":[int],
"count_sms": int,
"count_subscribers":int;
"message":"string",
"status":"string",
"isTransactonal": boolean,
"isPublic": boolean,
"create":datetime,
"schedule":datetime
}]
}

Request in PHP

<?
//Your key to access the API
$api_key="00000000000000000000000000000000";
//Method name
$method="campaignSmsSendNow";
echo"Method:".$method."<br>";
//parameters
$campaign_id="00001";
$parameters="apikey=$api_key&campaign_id=$campaign_id";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
//echo$result;
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
if(!empty($jsonObj->error)){
//Error of get the list of subscribers
echo"Anerroroccured:".$jsonObj->error;}
//Display the names and values
echo"Here'salistofyourdata:<br>";
data_output($jsonObj->data);
}
}else{
//Error connecting to API-server
echo"APIaccess error" ;
}

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:campaignSmsSendNow>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
</tem:campaignSmsSendNow>
</soapenv:Body>
</soapenv:Envelope>

campaignEmailSchedule - set sms-campaign in schedule

campaignSmsSchedule (string ApiKey, int campaign_Id, stringdate_time)

Method allows to set on schedule created SMS-campaign.

Parameters
apikey API key to access to your account
campaign_Id Id of campaign obtained by campaignSmsNew
date_time

Scheduled date and time set in the format MM/DD/YYYY HH: MM: SS

By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/campaignSmsSchedule?apikey=API_KEY&campaign_Id=CAMPAIGN_ID&date_time=DATE_TIME

The return value: data of set on the schedule campaign
success Value 1 if success, 0 if error
errors The number of successful requests
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with set on schedule campaign
SmsCampaign Array with data of campaign
id Number of campaign
title Name of campaign
senderName Alphaname (name of the sms-sender)
maillist_id Array with numbers of lists, on which campaign sent
int Number of list
count_sms Number of sms, needed to send
count_subscribers Number of subscribers in the campaign
message Content of sms
status Status of campaign
isTransactonal Transactional campaign
isPublic Public campaign
create Date and time of the created campaign
schedule Schedule time of sending a sms-campaign

Example (XML)

<ResultOfSmsCampaign>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<SmsCampaign>
<id>int</id>
<title>string</title>
<senderName>string</senderName>
<maillist_id>string</maillist_id>
<count_sms>string</count_sms>
<count_subscribers>string</count_subscribers>
<message>string</message>
<status>string</status>
<isTransactional>string</isTransactional>
<isPublic>string</isPublic>
<create>string</create>
<schedule>string</schedule>
</SmsCampaign>
</data>
</ResultOfSmsCampaign>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"warning":"",
"data":
[{"id":int,
"title":"string",
"senderName":"string",
"maillist_id":[int],
"count_sms": int,
"count_subscribers":int;
"message":"string",
"status":"string",
"isTransactonal": boolean,
"isPublic": boolean,
"create":datetime,
"schedule":datetime
}]
}

Request in PHP

<?
//Your key to access the API
$api_key="00000000000000000000000000000000";
//Method name
$method="campaignSmsSchedule";
echo"Method:".$method."<br>";
//parameters
$date_time=urlencode("12/12/201302:02:02");
$campaign_id="17703";
$parameters="apikey=$api_key&date_time=$date_time&campaign_id=$campaign_id";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
//echo$result;
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
if(!empty($jsonObj->error)){
//Error of get the list of subscribers
echo"Anerroroccured:".$jsonObj->error;}
//Display the names and values
echo"Here'salistofyourdata:<br>";
data_output($jsonObj->data);
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
//Displays data from indented
functiondata_output($obj,$level=0){
if(is_array($obj)||is_object($obj)){
if(is_object($obj)){
$obj=(array)$obj;
}
echocount($obj)>1?"<br/>n":"";
foreach($objas$key=>$value){
//itwasobject
if(!is_numeric($key)){
$prefix=str_repeat("&nbsp;&nbsp;",$level-1);
echo$prefix.$key.":";
}
data_output($value,$level+1);
}
}
else{
$prefix="&nbsp;&nbsp;";
if($obj===false)$obj='false';
echo$prefix.$obj."<br/>n";
}
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:campaignSmsSchedule>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
<tem:date_time>string</tem:date_time>
</tem:campaignSmsSchedule>
</soapenv:Body>
</soapenv:Envelope>

analyticsSmsGetResults - output the basic indicators of analytics SMS-campaign

analyticsSmsGetResults(string apikey, int campaign_id)

Method output the basic indicators of analytics SMS-camoaign.

Parameters
apikey API key to access to your account
campaign_id Nubmer of campaign
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/analyticsSmsGetResults?apikey=APIKEY&campaign_Id=CAMPAIGN_ID

The return value
success The number of successful requests
errors Number of errors
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with data of analytics
analyticsSmsGetResults Array with the basic indicators of campaign
campaign_name Name of campaign
campaign_subject Subject
sent The number of subscribers to whom campaign was sent
delivered The number of subscribers who received the campaign
undelivered The number of subscribers who haven't received campaign
pending The number of subscribers waiting for delivery the campaign

Example (XML)

<ResultOfSmsAnalyticsAbuseReports>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<analyticsSmsGetResults>
<campaign_name>string</campaign_name>
<campaign_subject>string</campaign_subject>
<campaign_sentdate>string</campaign_sentdate>
<sent>int</sent>
<delivered>int</delivered>
<undelivered>int</undelivered>
<pending>int</pending>
</SmsAnalyticsAbuseReports>
</data>
</ResultOfSmsAnalyticsAbuseReports>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"warning":""
"data":
[{"campaign_name":"string",
"campaign_subject":"string",
"campaign_sentdate":"string",
"sent":"2",
"delivered":"1",
"undelivered":"1",
"pending":"0",}]
}

Request in PHP

<?
//Your key to access the API
$api_key="";
//Method name
$method="analyticsSmsGetResults";
echo"Method:".$method."<br>";
//parameters
$campaign_id="";
$parameters="apikey=$api_key&campaign_id=$campaign_id";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
//Error of get the list of subscribers
if(!empty($jsonObj->error)){echo"Anerroroccured:".$jsonObj->error."<br/>";}
//Display the names and values
echo"Here'salistofyourdata:<br>";
foreach($jsonObj->dataas$key=>$jsons){//Thiswillsearchinthe2jsons
foreach($jsonsas$key=>$custom){
if(is_array($custom)){
echo$key.":<br/>";
foreach($customas$one){
echo"&nbsp;&nbsp;&nbsp;&nbsp;->".$one->name.":".$one->value."<br/>";
}
}else{
echo$key.":".$custom."<br/>";
}
}
}
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:analyticsSmsGetResults>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
</tem:analyticsSmsGetResults>
</soapenv:Body>
</soapenv:Envelope>

analyticsSmsSent - getting a list of subscribers to whom campaign was sent

analyticsSmsSent (string apikey, int campaign_id, int start, int count, string filterPhoneNumbers)

Method output from analytics of SMS-campaign list of subscribers whom campaign was sent.

Parameters
apikey API key to access to your account
campaign_id Nubmer of campaign
start Number of the first subscriber (default = 1, the optional — can be empty)
count Number of the returned records of subscribers (optional, default = 10000, not more than 10,000 per request, optional — can be empty)
filterPhoneNumbers List of phone numbers of subscribers (value optional — can be empty).
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/analyticsSmsSent?apikey=APIKEY&campaign_Id=CAMPAIGN_ID&start=START&count=COUNT&filterPhoneNumbers=PHONE_NUMBER1,PHONE_NUMBER2

The return value
success The number of successful requests
errors Number of errors
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with data of subscribers whom campaign was sent
AnalyticsSmsSent Array with data of subscribers whom campaign was sent
phone_number The phone number of subscriber

Example (XML)

<ResultOfAnalyticsSmsSent>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<AnalyticsSmsSent>
<phone_number>string</phone_number>
</AnalyticsSmsSent>
</data>
</ResultOfAnalyticsSmsSent>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"code":0,
"warning":"",
"data":
[{"pnone_number":"string",}]
}

Request in PHP

<?
//Your key to access the API
$api_key="";
//Method name
$method="analyticsSmsSent";
echo"Method:".$method."<br>";
//parameters
$campaign_id="";
$start="1";
$count="10";
$filterPhoneNumbers="..."
$parameters="apikey=$api_key&campaign_id=$campaign_id&start=$start&count=$count&filterPhoneNumbers=$filterPhoneNumbers";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
//Error of get the list of subscribers
if(!empty($jsonObj->error)){echo"Anerroroccured:".$jsonObj->error."<br/>";}
//Display the names and values
echo"Here'salistofyourdata:<br>";
foreach($jsonObj->dataas$key=>$jsons){//Thiswillsearchinthe2jsons
foreach($jsonsas$key=>$custom){
if(is_array($custom)){
echo$key.":<br/>";
foreach($customas$one){
echo"&nbsp;&nbsp;&nbsp;&nbsp;->".$one->name.":".$one->value."<br/>";
}
}else{
echo$key.":".$custom."<br/>";
}
}
}
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:analyticsSmsSent>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
<tem:start>int</tem:start>
<tem:count>int</tem:count>
<tem:filterPhoneNumbers>string</tem:filterPhoneNumbers>
</tem:analyticsSmsSent>
</soapenv:Body>
</soapenv:Envelope>

analyticsSmsPending - getting a list of subscribers waiting for delivery the message

analyticsSmsPending (string apikey, int campaign_id, int start, int count, string filterPhoneNumbers)

Method output from analytics of sms-campaign list of subscribers waiting for delivery a message.

Parameters
apikey API key to access to your account
campaign_id Nubmer of campaign
start Number of the first subscriber (default = 1, the optional — can be empty)
count Number of the returned records of subscribers (optional, default = 10000, not more than 10,000 per request, optional — can be empty)
filterPhoneNumbers List of phone numbers of subscribers (value optional — can be empty).
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/analyticsSmsPending?apikey=APIKEY&campaign_Id=CAMPAIGN_ID&start=START&count=COUNT&filterPhoneNumbers=PHONE_NUMBER1,PHONE_NUMBER2

The return value
success The number of successful requests
errors Number of errors
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with data of subscribers, waiting for delivery the sms-campaign
AnalyticsSmsPending Array with data of subscribers, waiting for delivery the sms-campaign
phone_number The phone number of subscriber

Example (XML)

<ResultOfAnalyticsSmsPending>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<AnalyticsSmsPending>
<phone_number>string</phone_number>
</AnalyticsSmsPending>
</data>
</ResultOfAnalyticsSmsPending>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"code":0,
"warning":"",
"data":
[{"pnone_number":"string",}]
}

Request in PHP

<?
//Your key to access the API
$api_key="";
//Method name
$method="analyticsSmsPending";
echo"Method:".$method."<br>";
//parameters
$campaign_id="";
$start="1";
$count="10";
$filterPhoneNumbers="..."
$parameters="apikey=$api_key&campaign_id=$campaign_id&start=$start&count=$count&filterPhoneNumbers=$filterPhoneNumbers";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
//Error of get the list of subscribers
if(!empty($jsonObj->error)){echo"Anerroroccured:".$jsonObj->error."<br/>";}
//Display the names and values
echo"Here'salistofyourdata:<br>";
foreach($jsonObj->dataas$key=>$jsons){//Thiswillsearchinthe2jsons
foreach($jsonsas$key=>$custom){
if(is_array($custom)){
echo$key.":<br/>";
foreach($customas$one){
echo"&nbsp;&nbsp;&nbsp;&nbsp;->".$one->name.":".$one->value."<br/>";
}
}else{
echo$key.":".$custom."<br/>";
}
}
}
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:analyticsSmsPending>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
<tem:start>int</tem:start>
<tem:count>int</tem:count>
<tem:filterPhoneNumbers>string</tem:filterPhoneNumbers>
</tem:analyticsSmsPending>
</soapenv:Body>
</soapenv:Envelope>

analyticsSmsDelivered - getting a list of subscribers who have received SMS-campaign

analyticsSmsDelivered (string apikey, int campaign_id, int start, int count, string filterPhoneNumbers)

Method output from campaign analytics a list of subscribers who have received SMS-campaign.

Parameters
apikey API key to access to your account
campaign_id Nubmer of campaign
start Number of the first subscriber (default = 1, the optional — can be empty)
count Number of the returned records of subscribers (optional, default = 10000, not more than 10,000 per request, optional — can be empty)
filterPhoneNumbers List of phone numbers of subscribers (value optional — can be empty).
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/analyticsSmsDelivered?apikey=APIKEY&campaign_Id=CAMPAIGN_ID&start=START&count=COUNT&filterPhoneNumbers=PHONE_NUMBER1,PHONE_NUMBER2

The return value
success The number of successful requests
errors Number of errors
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with data of subscribers who received theSMS-campaign
AnalyticsSmsDelivered Array with data of subscribers who received theSMS-campaign
phone_number The phone number of subscriber

Example (XML)

<ResultOfAnalyticsSmsDelivered>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<AnalyticsSmsDelivered>
<phone_number>string</phone_number>
</AnalyticsSmsDelivered>
</data>
</ResultOfAnalyticsSmsDelivered>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"code":0,
"warning":"",
"data":
[{"pnone_number":"string",}]
}

Request in PHP

<?
//Your key to access the API
$api_key="";
//Method name
$method="analyticsSmsDelivered";
echo"Method:".$method."<br>";
//parameters
$campaign_id="";
$start="1";
$count="10";
$filterPhoneNumbers="..."
$parameters="apikey=$api_key&campaign_id=$campaign_id&start=$start&count=$count&filterPhoneNumbers=$filterPhoneNumbers";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
//Error of get the list of subscribers
if(!empty($jsonObj->error)){echo"Anerroroccured:".$jsonObj->error."<br/>";}
//Display the names and values
echo"Here'salistofyourdata:<br>";
foreach($jsonObj->dataas$key=>$jsons){//Thiswillsearchinthe2jsons
foreach($jsonsas$key=>$custom){
if(is_array($custom)){
echo$key.":<br/>";
foreach($customas$one){
echo"&nbsp;&nbsp;&nbsp;&nbsp;->".$one->name.":".$one->value."<br/>";
}
}else{
echo$key.":".$custom."<br/>";
}
}
}
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:analyticsSmsDelivered>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
<tem:start>int</tem:start>
<tem:count>int</tem:count>
<tem:filterPhoneNumbers>string</tem:filterPhoneNumbers>
</tem:analyticsSmsDelivered>
</soapenv:Body>
</soapenv:Envelope>

analyticsSmsUndelivered - getting a list of subscribers who haven't received the SMS campaign

analyticsSmsUndelivered (string apikey, int campaign_id, int start, int count, string filterPhoneNumbers)

Method output from sms-campaign analytics a list of subscribers who haven't received the message of campaign.

Parameters
apikey API key to access to your account
campaign_id Nubmer of campaign
start Number of the first subscriber (default = 1, the optional — can be empty)
count Number of the returned records of subscribers (optional, default = 10000, not more than 10,000 per request, optional — can be empty)
filterPhoneNumbers List of phone numbers of subscribers (value optional — can be empty).
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/analyticsSmsUndelivered?apikey=APIKEY&campaign_Id=CAMPAIGN_ID&start=START&count=COUNT&filterPhoneNumbers=PHONE_NUMBER1,PHONE_NUMBER2

The return value
success The number of successful requests
errors Number of errors
error Text description of error
code Error code
warning Additional warnings for the xml, not output when null
data Array with data of subscribers who haven't received the campaign
AnalyticsSmsUndelivered Array with data of one subscriber and the reason of not delivery
phone_number Phone number of subscriber
reason The reason of not delivery
timestamp The registration time of information of not delivery

Example (XML)

<ResultOfAnalyticsSmsUndelivered>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<AnalyticsSmsUndelivered>
<phone_number>string</phone_number>
<reason>string</reason>
</AnalyticsSmsUndelivered>
</data>
</ResultOfAnalyticsSmsUndelivered>

Example (JSON)

{
"success":1,
"errors":0,
"error":"",
"code":0,
"warning":"",
"data":
[{"pnone_number":"string",
"reason":"string",}]
}

Request in PHP

<?
//Your key to access the API
$api_key="";
//Method name
$method="analyticsSmsUndelivered";
echo"Method:".$method."<br>";
//parameters
$campaign_id="";
$start="1";
$count="10";
$filterPhoneNumbers="..."
$parameters="apikey=$api_key&campaign_id=$campaign_id&start=$start&count=$count&filterPhoneNumbers=$filterPhoneNumbers";
echo"Parameters:".$parameters."<br>";
//Create a GET-request
$api_url="http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo"Url:".$api_url."<br><hr/>";
//Make a request to the API-server
$result=file_get_contents($api_url);
if($result){
//Decoding of answer API-server
$jsonObj=json_decode($result);
if(null===$jsonObj){
//Error in the received reply
echo"InvalidJSON";
}
else{
//Error of get the list of subscribers
if(!empty($jsonObj->error)){echo"Anerroroccured:".$jsonObj->error."<br/>";}
//Display names and values
echo"Here'salistofyourdata:<br>";
foreach($jsonObj->dataas$key=>$jsons){//Thiswillsearchinthe2jsons
foreach($jsonsas$key=>$custom){
if(is_array($custom)){
echo$key.":<br/>";
foreach($customas$one){
echo"&nbsp;&nbsp;&nbsp;&nbsp;->".$one->name.":".$one->value."<br/>";
}
}else{
echo$key.":".$custom."<br/>";
}
}
}
}
}else{
//Error connecting to API-server
echo"APIaccesserror";
}
?>

SOAP request

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:analyticsSmsUndelivered>
<tem:apikey>string</tem:apikey>
<tem:campaign_id>int</tem:campaign_id>
<tem:start>int</tem:start>
<tem:count>int</tem:count>
<tem:filterPhoneNumbers>string</tem:filterPhoneNumbers>
<tem:reason>int</tem:reason>
</tem:analyticsSmsUndelivered>
</soapenv:Body>
</soapenv:Envelope>