This method is a reseller only method and will not work with a standard account


This method is used to return your clients. It is identical to the 'clients.get' method but also includes balance data.


Parameters:



  • offset - integer - used to specify where to start reading from in the data set - 0 being the first item.

  • limit - integer - used to specify maximum number of records to return. 0 disables any limit but should only be used for small data sets.


 




 




XML Request Example


<?xml version='1.0'?>

<request>
<interface>PHP</interface>
<version>0.3</version>
<key>API_KEY</key>
<secret>API_SECRET</secret>
<method>clients.get-full</method>
<params>
<offset>0</offset>
<limit>10</limit>
</params>
</request>







XML Response Example


<?xml version='1.0'?>

<xml>
<method>clients.get-full</method>
<total>1</total>
<time>2010-01-20 22:45:10 GMT</time>
<timestamp>1264027510 GMT</timestamp>
<dataset>
<data>
<id>xxx</id>
<name>Client Name</name>
<name_company>Client Company Name</name_company>
<email>client@email.com</email>
<phone>xxxxxxx</phone>
<currency>AUD</currency>
<timezone>Australia/Sydney</timezone>
<reseller_markup>3.1</reseller_markup>
<reseller_markup_campaign>0.00</reseller_markup_campaign>
<apikey>client_api_key</apikey>
<apisecret>client_api_secret</apisecret>
<balance_recharge>0</balance_recharge>
<total_lists>0</total_lists>
<total_sms>0</total_sms>
<total_contacts>0</total_contacts>
<total_spend>0.000</total_spend>
<total_reseller_revenue>0.000</total_reseller_revenue>
<balance>200.000</balance>
</data>
</dataset>
</xml>







PHP Example


Download the PHP API Client


<?php


// change api key and secret to your own
$myAPIKey = "API_KEY";
$myAPISecret = "API_SECRET";

// include base class
require('APIclient.php');

// create new client object
$transmitsmsAPI = new transmitsmsAPI($myAPIKey, $myAPISecret);

// set parameters
$offset = 0;
$limit = 10;

// execute request
$methodResponse = $transmitsmsAPI->getClientsFull($offset, $limit);

// parse response into xml object
$xml = @simplexml_load_string($methodResponse);

echo 'There are ' . $xml->total . ' clients<hr />';
foreach ($xml->dataset->data as $client) {
echo 'Client ' . (string) $client->name . ' has an id of ' . (string) $client->id . '<br />';
}

?>






GET Example


Using a URL based request system you can request this method by using the below URL - be sure to url encode all your variables!


http://burst.transmitsms.com/api-wrapper/clients.get-full?apikey=API_KEY&apisecret=API_SECRET&offset=0&limit=10