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


This method is used to return information on a specific client.


Parameters:



  • id - integer - the client system id - can be retrieved using the 'clients.get' method


 




 




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-by-id</method>
<params>
<id>1</id>
</params>
</request>







XML Response Example


<?xml version='1.0'?>

<xml>
<method>clients.get-by-id</method>
<total>1</total>
<time>2010-01-27 03:48:41 GMT</time>
<timestamp>1264564121 GMT</timestamp>
<data>
<id>1</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>
</data>
</xml>







PHP Example


<?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
$client_id = 1;

// execute request
$methodResponse = $transmitsmsAPI->getClientByID($client_id);

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

echo "Client " . (string) $xml->data->name . " has spent " . (string) $xml->data->total_spend . " and has generated " . (string) $xml->data->total_reseller_revenue;

?>






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-by-id?apikey=API_KEY&apisecret=API_SECRET&id=CLIENT_ID