Cancel a Client Account

Purpose: Close a client account and remove the client from our systems.
Parent API: Client Ops [http://www.simplescripts.com/api/client_ops.php]
Notes: Cancelling a client will remove the client from our systems, including all existing installation data!

Requirements

This API can be accessed via a standard GET or POST request.
KeyValueNotes
m"cancel_client""m" sets the mode of operation for the parent API.
host_keyYour Host KeyYour Host Key is a unique identifier provided by SimpleScripts for tracking purposes. This key is used in all SimpleScripts APIs.
host_api_keyYour Host API KeyYour Host API Key is a special password required to use this and any other SimpleScripts API. Keep this password secure!
uniqueCurrent Unique Account IDThe existing host-wide unique id for the client. Can be the user's username (if unique among ALL of your servers) or an account id, etc.

Return Values

A successful request (not necessarily a successful operation) will return a string concatenated with a pipe "|" symbol, like this: "0|Secure Connection Required". Exploding the string on the pipe symbol will give you an array of parts, which are notated below. Part Zero will always be a binary 0 or 1, depending on the operations failure or success, respectively.
SuccessPart 1Notes
0Secure Connection RequiredAll requests must use the https:// protocol when calling the SimpleScripts APIs.
0HostKey RequiredThis field is required. For more info, view the Requirements table above.
0HostAPIKey RequiredThis field is required. For more info, view the Requirements table above.
0Invalid HostKey/HostAPIKey CombinationJust like a bad username/password combination, this means you have provided bad information.
0Unique ID RequiredThe client's unique id is required. For more info, view the Requirements table above.
1UniqueID Does Not ExistThe specified Unique ID does not exist in our system. This returns successful.
1UniqueID "unique" Cancelled SuccessfullyThe operation completed successfully.

Sample Request

<?php

$url = "https://www.simplescripts.com/api/client_ops.php";

$my_request = array(
   "host_key" => "YOUR HOST KEY",
   "host_api_key" => "YOUR HOST API KEY",
   "m" => "cancel_client",
   "unique" => "UNIQUE CLIENT ID HERE", 
);

//use CURL or equivalent to get response data 
//returns: 0|Host Key Required or 1|UniqueID "unique" Cancelled Successfully

?>