Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Module: Mage_Customer

Resource: customer_address

Method:

  • customer_address.info (SOAP V1)
  • customerAddressInfo (SOAP V2)

Retrieve information about the required customer address.

Arguments:

TypeNameDescription
stringsessionIdSession ID
intaddressIdAddress ID

Returns:

TypeNameDescription
arrayinfoArray of customerAddressEntityItem

The customerAddressEntityItem content is as follows:

TypeNameDescription
intcustomer_address_idID of the customer address
stringcreated_atDate when the address was created
stringupdated_atDate when the address was updated
stringincrement_idIncrement ID
stringcityname of the city
stringcompanyName of the company
stringcountry_idID of the country
stringfaxFax
stringfirstnameCustomer first name
stringlastnameCustomer last name
stringmiddlenameCustomer middle name
stringpostcodeCustomer postcode
stringprefixCustomer prefix
stringregionName of the region
intregion_idRegion ID
stringstreetName of the street
stringsuffixCustomer suffix
stringtelephoneTelephone number
booleanis_default_billingTrue if the address is the default one for billing
booleanis_default_shippingTrue if the address is the default one for shipping

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'customer_address.info', '2');
var_dump($result);

// If you don't need the session anymore
//$client->endSession($session);
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy->customerAddressInfo($sessionId, '2');
var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey')); 
 
$result = $proxy->customerAddressInfo((object)array('sessionId' => $sessionId->result, 'addressId' => '2'));   
var_dump($result->result);
Response Example SOAP V1
array
  'customer_address_id' => string '2' (length=1)
  'created_at' => string '2012-03-29 13:20:08' (length=19)
  'updated_at' => string '2012-03-29 13:20:08' (length=19)
  'increment_id' => null
  'city' => string 'Las Vegas' (length=9)
  'company' => null
  'country_id' => string 'US' (length=2)
  'fax' => null
  'firstname' => string 'johny' (length=5)
  'lastname' => string 'doe' (length=3)
  'middlename' => null
  'postcode' => string '89032' (length=5)
  'prefix' => null
  'region' => string 'Nevada' (length=6)
  'region_id' => string '39' (length=2)
  'street' => string '3406 Hiney Road' (length=15)
  'suffix' => null
  'telephone' => string '702-283-9556' (length=12)
  'vat_id' => null
  'vat_is_valid' => null
  'vat_request_date' => null
  'vat_request_id' => null
  'vat_request_success' => null
  'is_default_billing' => boolean false
  'is_default_shipping' => boolean true

Table of contents