Addresses

The Addresses API provides access to the shopper's configured addresses. A shopper has a default address and a secondary address. Each address has a nickname; for example, "Home" and "Work" nicknames for addresses, with the "Home" address set as the default address. The Addresses API requires a full access token. If you need to access or update a billing or shipping address, use the appropriate methods available in the Billing and Shipping Address API.

Methods


					Host: api.digitalriver.com
User-Agent: API Client/1.0
Accept: application/xml
Authorization: bearer your_access_token
			
					The request body should be empty.
			
					HTTP/1.1 204 No Content
Content-Length: 0
Date: Mon, 25 Mar 2013 14:48:21 GMT
			
					The response body should be empty.
			
					Request-Headers/Generic-json
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{"addresses": {
         "uri": "https://api.digitalriver.com/v1/shoppers/me/addresses",
   "address":    [
            {
           "uri": "https://api.digitalriver.com/v1/shoppers/me/address/address_ID",
         "nickName": "Home",
         "isDefault": "true"
      },
            {
         "uri": "https://api.digitalriver.com/v1/shoppers/me/address/address_ID",
         "nickName": "Work",
         "isDefault": "false"
      }
   ]
}}
			
					Host: api.digitalriver.com
User-Agent: API Client/1.0
Accept: */*
Authorization: bearer your_access_token
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					<address uri="https://api.digitalriver.com/v1/shoppers/me/address/address_ID">
        <id>address_ID</id>
        <nickName>Home</nickName>
        <isDefault>true</isDefault>
        <firstName>John</firstName>
        <lastName>Smith</lastName>
        <line1>12345 W 76th St</line1>
        <line2>Suite 100</line2>
        <city>Eden Prairie</city>
        <countrySubdivision>MN</countrySubdivision>
        <postalCode>55555</postalCode>
        <country>US</country>
        <countryName>United States</countryName>
        <phoneNumber>555-555-5555</phoneNumber>
</address>
			
					Host: api.digitalriver.com
User-Agent: API Client/1.0
Authorization: bearer your_access_token
Content-Length: 426
			
					<address>
   <nickName>home</nickName>
   <isDefault>true</isDefault>
   <firstName>John</firstName>
   <lastName>Smith</lastName>
   <line1>18251 Flying Cloud Drive</line1>
   <line2>Suite 100</line2>
   <city>Eden Prairie</city>
   <countrySubdivision>MN</countrySubdivision>
   <postalCode>55344</postalCode>
   <country>US</country>
   <countryName>United States</countryName>
   <phoneNumber>999-111-2222</phoneNumber>
</address>
			
					HTTP/1.1 204 No Content
Content-Length: 0
Date: Mon, 25 Mar 2013 14:48:21 GMT
			
					The response body should be empty.
			

Response Body Parameters

Field
Data Type
Visibility
Description
city
string
default
The name of the city.
companyName
string
expand
The name of the company associated with the addressee.
county
string
default
The ISO 3166-1 alpha-2 code of the address.
countrySubdivision
string
default
The ISO 3166-2 country subdivision code of the address. The format of the ISO 3166-2 codes is different for each country. The codes may be alphabetic, numeric, or alphanumeric, and they may also be of constant or variable length.
countyName
string
expand
The name of the county.
emailAddress string default The addressee's email address.
firstName
string
default
The addressee's first name.
id
string
default
The address ID. When you create an address, the ID is automatically assigned.
isDefault
Boolean
default
When true, this address is the default address for the shopper.
lastName
string
default
The addressee's last name.
line1
string
default
The first line of the address.
line2
string
default
The second line of the address.
line3
string
default
The third line of the address.
nickName
string
default
The nickname of the shopper's address (for example, home or work).
phoneNumber
string
default
The addressee's phone number.
postalCode
string
default
The postal code of the address.