API List Account For

Api List Account For

Lists out account information for the account associated with the admin email. The api token must be valid. The admin email is required. The account name, address and token will be returned along with every user associated with the account along with an error code and error message.

Put call format:
http://www.funshineonline.com/api/listAccountFor.php?api_token=:token&admin_email=:admin_email
- api_token : required, 32 character token(a token will be assigned)
- admin_email : required, the admin user to get the account information, e.g. testadmin@e18s.com


Object:

Format json
{
   "id" : "32",
   "name" : "Walters Test Account",
   "address" : [
           "street_address" : "123 Main Street",
           "street_address2" : "Building A Suite B",
           "city" : "London",
           "state" : "OH",
           "zip" : "43140"
       ],
   "phone" : "(800) 123-1234",
   "contact" : "Elroy Sparks",
   "token" : "15d24xxx4740iKJ1423kcab",
   "active" : "Yes",
   "users" : [
           "email" : "abc@email.com",
           "first_name" : "Elroy",
           "last_name" : "Sparks",
           "role" : "Admin",
           "last_logon_attempt" : "2018-04-20 12:30:12",
           "active" : "Yes",
   ]  
   "user_count" : "1",
  "error_code": 0,
  "error_message": "Successful."
}
 
Example:
PHP:
$listurl = "http://www.funshineonline.com/api/listAccountFor.php?api_token=" . $token . "&admin_email=" . $admin_email;
$jsonData = file_get_contents($listurl);
$theData = json_decode($jsonData, true);
print_r($theData);

Back