Client API

Getting Started

Before you can start using the client API you first need to enable API access. This needs to be done by logging into the client area, clicking on 'Hello, <NAME>', then 'Client API', then the 'API Status' tab and finally the 'Enable API' button.

API End Point

Each API request should be directed to:

The client API accepts parameters using either POST or GET. We always recommend using POST!

Required Parameters

The following parameters are always required when making a API request.

  • m - This parameter will always be set to clientapi
  • apikey - Used to authenticate your API request, without it your API request will fail.
  • apimodule - The API module you wish to use
  • apifunction - The function provided by the module you wish to run

Modules and Functions

Below are a list of modules and it's corresponding functions.


  • getdetails


Example API request using the curl command

Below shows how one could make a simple API request using curl to retrieve your current client details

curl \
-d m=clientapi \
-d apikey=supersecretkey \
-d apimodule=client \
-d apifunction=getdetails

Example API request using PHP's curl function

// Required Parameters
$post['m'] = 'clientapi';
$post['apikey'] = 'supersecretkey';
$post['apimodule'] = 'client';
$post['apifunction'] = 'getdetails';
// Curl Init
$ch = curl_init();
if($ch === false) die('Curl Error: curl_init failed');
// Curl Options
curl_setopt($ch, CURLOPT_URL, '' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Curl Result
$result = curl_exec($ch);
if($result === false) die(curl_error($ch));
// Result Info
$curlinfo = @curl_getinfo($ch);
if($curlinfo['content_type'] != 'application/json') die("api response was not JSON\n");
// Decode JSON into an array
$result = @json_decode($result, true);
if(!is_array($result)) die("failed to decode JSON response\n");
// Print out result

Example JSON response

   "message":"successfully retrieved client details",
      "address1":"1001 Ave Pico",
      "city":"San Clemente",
      "lastlogin":"2012-08-01 18:30:56",