The purpose of this method is currently unclear to me. I suspect it is not fully implemented or maybe this works for its purpose but there are still some other methods which have not been implemented.
Obviously it is used capture address details from the user. What's not clear is if this is supposed to be used as part of a sign up process (which is mandatory in the regular shop) or simply to provide shipping details. Running the method doesn't change or add address details to the account I specify. How can this be part of a sign up process when one of the fields is user_id? How can this be used for shipping details if the data is not reflected in the account?
One current use seems to be in calculating shipping costs in the get_basket method as the cost changed (it was actually reduced) when I executed the add_address method.
Didn't give phone, fax or URL. It didn't complain. It simply returned return=1987545. I entered: addressType=1 (don't know what values this expects - “billing” or “shipping” perhaps?), address.user_id=(my user id as found in Profile > I am section of my account) , address.salutation_id=1, countrycode=IE. The rest I gave as expected.
Irish customers are expected to give n.a. for the postal code.
add_address ( String token, String addressType, int address.user_id, int address.salutation_id, String address.firstname, String address.surname, String address.company, String address.street, String address.street2, String address.zipcode, String address.city, String address.countrycode, String address.statecode, String address.phone, String address.fax, String address.email, String address.url, )
| Type | Parameter Name | Parameter Description |
|---|---|---|
| string | token | session token |
| string | addressType | billing or shipping because the shippingaddress_id and billingaddress_id fields, in the get_basket method, are correct when these values are used. |
| int | address.user_id | User's user ID |
| int | address.salutation_id |
The return value is an integer
| Type | Return Value Name | Return Value Description |
|---|---|---|
| int | addressId |
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method: