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!
This API can be accessed via a standard GET or POST request.
|m||"cancel_client"||"m" sets the mode of operation for the parent API.|
|host_key||Your Host Key||Your Host Key is a unique identifier provided by SimpleScripts for tracking purposes. This key is used in all SimpleScripts APIs.|
|host_api_key||Your Host API Key||Your Host API Key is a special password required to use this and any other SimpleScripts API. Keep this password secure!|
|unique||Current Unique Account ID||The 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.|
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.
|0||Secure Connection Required||All requests must use the https:// protocol when calling the SimpleScripts APIs.|
|0||HostKey Required||This field is required. For more info, view the Requirements table above.|
|0||HostAPIKey Required||This field is required. For more info, view the Requirements table above.|
|0||Invalid HostKey/HostAPIKey Combination||Just like a bad username/password combination, this means you have provided bad information.|
|0||Unique ID Required||The client's unique id is required. For more info, view the Requirements table above.|
|1||UniqueID Does Not Exist||The specified Unique ID does not exist in our system. This returns successful.|
|1||UniqueID "unique" Cancelled Successfully||The operation completed successfully.|
$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