The GetAccount service allows you to get information about the current account
SOAP Action: GetAccount
SOAP Return Object: GetAccountResp
The following table describes the parameters used for calling the GetAccount service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
The following table describes the parameters returned from the GetAccount service.
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 |
account | / | AccountType | The current account type |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
Get current account information
<?php // create header object $header = new stdClass(); $header->userId = USER_ID; $header->userToken = USER_TOKEN; // build request $request = new stdClass(); $request->header = $header; $response = $SoapClient->__soapCall("GetAccount", array($request)); if ($response->errorCode == 0) { print_r($response->account); } else { echo "Could not get account information: " . $response->errorMessage; }?>