Document Properties
KbidS24915
Last Modified23-Jun-2020
Added to KB15-Jul-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7

REST API - Update customer address (until 7.7)

URI

/customers/-/addresses/<address-id>

Http Method

PUT

Short Description

Updates a customer address with address data provided from the client.

Query Parameters

none

Example Requests

/customers/-/addresses/cokKCgoKKaEAAAE_4SIKfNMG

HTTP Status Codes

200 OK
303 See Other
400 Bad Request

       Possible values for header error-key:

    • customer.address.missing_fields.error

401 Unauthorized
404 Not found

       Possible values for header error-key:

    •  customer.address.not_found.error

Description

Updates a customer address with data provided by the client. The address should complete the following requirements:

*Address Name (optional)
*Country Code (mandatory)
*First Name (mandatory)
*Last Name (mandatory)
*Address Line 1 (mandatory)
*Address Line 2 (optional)
*Postal Code (mandatory)
*City (mandatory)
*State/Province (optional)
*Phone (optional)

Note

The country is represented as country code. A valid country code in ISO 3166-1 format is required!

Cartridge

app_sf_rest

ApplicationB2C Web Shop, SMB Web Shop

Product Version

7.5.1

Product To Version

7.7

Status

final

JSON

Request Data Format

application/json

Request related java object

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressItemResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO

Request Example

{
  "state": "Berlin",
  "countryCode": "DE",
  "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
  "postalCode": "14482",
  "city": "Potsdam",
  "street": "Berliner Str. 210",
  "phoneHome": "049364112677",
  "firstName": "Patricia",
  "lastName": "Miller"
}

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressItemResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO

Response Example

Status 200:

{
  "type": "Address",
  "state": "Berlin",
  "country": "Germany",
  "id": "e1cKCgoKhbkAAAFCBZAxcEzD",
  "addressName": "Patricia Miller, Berliner Str. 210, Potsdam",
  "email": "",
  "city": "Potsdam",
  "street": "Berliner Str. 210",
  "street2": "",
  "street3": "",
  "mobile": "",
  "phoneHome": "049364112677",
  "firstName": "Patricia",
  "lastName": "Miller",
  "title": "",
  "countryCode": "DE",
  "postalCode": "14482",
  "phoneBusiness": ""
}

Status 303:

{
  "elements": [
    {
      "type": "Link",
      "title": "Pacific Ave 123,NY,12121,Norfolk,US",
      "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/customers/-/addresses/e1cKCgoKhbkAAAFCBZAxcEzD/suggestions/2"
    }
  ],
  "type": "ResourceCollection"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressItemResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO

XML Request Example

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Address>
    <city>Norfolk</city>
    <countryCode>US</countryCode>
    <firstName>Patricia</firstName>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>12121</postalCode>
    <state>CO</state>
    <street>123 Pacific Ave</street>
</Address>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressItemResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO

XML Response Example

Status 200:

<Address type="Address">
    <addressName>Patricia Miller, Berliner Str. 210, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <email/>
    <firstName>Patricia</firstName>
    <ID>e1cKCgoKhbkAAAFCBZAxcEzD</ID>
    <lastName>Miller</lastName>
    <mobile/>
    <phoneBusiness/>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <state>Berlin</state>
    <street>Berliner Str. 210</street>
    <street2/>
    <street3/>
    <title/>
</Address>

Status 303:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourceCollection type="ResourceCollection">
  <elements>
    <Link type="Link">
      <title>Pacific Ave 123,NY,12121,Norfolk,US</title>
      <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/customers/-/addresses/e1cKCgoKhbkAAAFCBZAxcEzD/suggestions/2</uri>
    </Link>
  </elements>
</ResourceCollection>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets