cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the shipping_address_id from a SalesOrderEntity

Getting the shipping_address_id from a SalesOrderEntity

I'm trying to retrieve a valid shipping_address_id from a salesorder in Magento.

 

I'm developing an integration for a desktop application. I'm connecting to a Magento 1.9 installation. I'm writing this in VB.NET (VS 2013). I'm using the SOAP method to retrieve data, and we are storing a "mapping" to relate the data in Magento to the data stored in the desktop application. 

 

On my customers Magento test site I log in and create an account and add Billing and Shipping addresses. I then order products. During that order, I enter a NEW shipping address, and Magento processes the order as expected.

 

From my .NET desktop, I then get the information for that order. I can get all of the necessary details except the handle to the new Address that was entered when creating the order. I create a salesOrderEntity item, and get that from Magento, and all of the information is there - but the shipping_addresss_id value for that salesOrderEntity is one that is not found in the Magento address tables. 

 

As an example, the shipping_address_id for that sales order is 1130, and that value is NOT associated with the customer. During the process the Address is added to the Customer record, but Magento assigns a value of 873 to that address, not 1130.

 

Is there any method I can use to get the actual I get the actual Address value (the 875) for the Shipping address used in the Sales Order?