add_address

Description

:?: 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.

Methods and Parameters

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.

WSDL http://www.spreadshirt.net/services.php?wsdl

Definition

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,
)

Parameters

Type Parameter Name Parameter Description
string token session token
string addressType :?: Valid values appear to be 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 :?: Presumably something like 0=None, 1=Mr., 2=Mrs., 3=Ms., 4=Company. This would be consistent with the Spreadshop user account page.

Return Values

The return value is an integer

Type Return Value Name Return Value Description
int addressId :?: Not sure what this represents. Some sort of unique address id.

Error Messages

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:

  • ###: ######
api/add_address.txt · Last modified: 2009/07/28 08:16 by thuperadmin
 
Recent changes RSS feed Driven by DokuWiki