Magento 1.9.2 API – Get Customer Address Using SOAP API

apicustomercustomer-addressmagento-1.9shipping-address

following is my code

$client = new SoapClient('My api url');

$session = $client->login('username', '*********');

$result = $client->customerAddressInfo($session, $address_id);

Following is the error

Uncaught SoapFault exception: [102] Address not exists.

Can anyone explain where am i going wrong.

Best Answer

To get order shipment detail via API use below code:

<?php

$client = new SoapClient('http://127.0.0.1/magento1921/api/soap/?wsdl');
$session = $client->login('admin', '0f9a9394cb511775b84bbeb88750126d');
$result = $client->call($session, 'sales_order.info', '100000205');
echo "<pre>";
print_r($result['shipping_address']);

Above code will return you order details array including billing, shipping, items, etc.

To get order shipping address user $result['shipping_address'].

Hope this will help you.

Note: Please change API URL, Login Detail, and Order # with your detail.

Related Topic