Service: GetAccount

The GetAccount service allows you to get information about the current account

Service Details

SOAP Action: GetAccount
SOAP Return Object: GetAccountResp

Input

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

Table: instance of GetAccountReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication

Output

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

Table: instance of GetAccountResp

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

Table: response codes of GetAccountResp.

0 No error
220 Authentication error, see header object for detailed information

Example

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;
}?>