Service: DeleteAccount

The DeleteAccount service allows an agency to delete an existing sub-account.

Service Details

SOAP Action: DeleteAccount
SOAP Return Object:DeleteAccountResp

Input

The following table describes the parameters used for calling the DeleteAccount service.

Table: instance of DeleteAccountReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication

Output

The following table describes the parameters returned from the DeleteAccount service.

Table: instance of DeleteAccountResp

Parameter Mandatory Type Description
header / APIResponseHeader Header containing authentication information
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error

Table: response codes of DeleteAccountResp.

0 No error
220 Authentication error, see header object for detailed information
221 Account does not exist

Example

Delete agency sub-account with userId 888

<?php

// create header object
$header = new stdClass();
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;

// create account object
$account = new stdClass();
$account->userId = 888;

$request = new stdClass();
$request->header = $header;
$request->accountType = $account;

$response = $SoapClient->__soapCall("DeleteAccount", array($request));

if ($response->errorCode == 0) {
	echo "Account delete";
} else {
	echo Account deletion failed: " . $response->errorMessage;
}

?>