Related Documents
Document Properties
Kbid27G655
Last Modified23-Jun-2020
Added to KB29-Jun-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Update customer address




Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

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

OR

/customers/-/addresses/<address-id> (deprecated)

Http Method

PUT

Short Description

Updates a customer address with address data provided from the client

Query Parameters

none

Example Requests

/customers/Qi0KAB2YXfMAAAFVcOVB7DQp/addresses/cokKCgoKKaEAAAE_4SIKfNMG

HTTP Status Codes

200 OK
400 Bad Request

Possible values for header ‘error-key’:

  • customer.address.missing_fields.error
  • customer.address.update.error.inconsistentUsage

Other errors ("customer.address.update.error.<failureCode>") may be returned if AddressUpdateHandlers are registered (see Concept - Address Handling).

401 Unauthorized

403 Forbidden

Possible values for header ‘error-key’:

  • customer.address.update.error.AddressNotUpdatable

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 following attributes are supported in the request body (attributes in bold are required):

  • addressName

  • firstName

  • secondName

  • lastName

  • secondLastName

  • addressLine1

  • addressLine2

  • addressLine3

  • city

  • postalCode

  • countryCode

  • mainDivision

  • subDivision

  • postBox

  • title

  • aristocraticTitle

  • honorific

  • jobTitle

  • phoneMobile

  • phoneHome

  • phoneBusiness

  • phoneBusinessDirect

  • fax

  • email

  • companyName1

  • companyName2

  • invoiceToAddress

  • shipToAddress

  • shipFromAddress

  • serviceToAddress

  • installToAddress

  • usage

Note

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

Deprecated attributes:

  • company (new: companyName1)
  • mobile (new: phoneMobile)
  • state (new: mainDivision)
  • street (new: addressLine1)
  • street2 (new: addressLine2)
  • street3 (new: addressLine3)

Cartridge

app_sf_rest

ApplicationB2C Web Shop, SMB Web Shop

Product Version

7.8

Product To Version

 
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

{
  "mainDivision": "Brandenburg", 
  "countryCode": "DE",
  "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
  "postalCode": "14482",
  "city": "Potsdam",
  "addressLine1": "Berliner Str. 210",
  "phoneHome": "049123456789",
  "firstName": "Patricia",
  "lastName": "Miller",
  "invoiceToAddress": true
}

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",
  "urn": "urn:address:customer:Qi0KAB2YXfMAAAFVcOVB7DQp:hBIKAB2YvVMAAAFValUOPDU8",
  "id": "hBIKAB2YvVMAAAFValUOPDU8",
  "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
  "firstName": "Patricia",
  "lastName": "Miller",
  "addressLine1": "Berliner Str. 210",
  "mainDivision": "Brandenburg",
  "postalCode": "14482",
  "phoneHome": "049123456789",
  "country": "Germany",
  "countryCode": "DE",
  "city": "Potsdam",
  "usage": [
    true
  ],
  "state": "Brandenburg",
  "shipToAddress": false,
  "street": "Berliner Str. 210",
  "invoiceToAddress": true,
  "shipFromAddress": false,
  "serviceToAddress": false,
  "installToAddress": false
}

If an address check service is active and suggestions are found:

{
  "type": "Link",
  "uri": "inSPIRED-inTRONICS-Site/-/customers/Qi0KAB2YXfMAAAFVcOVB7DQp/addresses/hBIKAB2YvVMAAAFValUOPDU8/suggestions"
}

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>DE</countryCode>
    <firstName>Patricia</firstName>
    <lastName>Miller</lastName>
    <phoneHome>001123456789</phoneHome>
    <postalCode>12345</postalCode>
    <mainDivision>CO</mainDivision>
    <addressLine1>123 Pacific Ave</addressLine1>
	<invoiceToAddress>true</invoiceToAddress>
</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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Address type="Address">
    <addressLine1>123 Pacific Ave</addressLine1>
    <addressName>123 Pacific Ave,Patricia,Miller,CO,12345,Norfolk,DE</addressName>
    <city>Norfolk</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>hBIKAB2YvVMAAAFValUOPDU8</id>
    <installToAddress>false</installToAddress>
    <invoiceToAddress>true</invoiceToAddress>
    <lastName>Miller</lastName>
    <mainDivision>CO</mainDivision>
    <phoneHome>001123456789</phoneHome>
    <postalCode>12345</postalCode>
    <serviceToAddress>false</serviceToAddress>
    <shipFromAddress>false</shipFromAddress>
    <shipToAddress>false</shipToAddress>
    <state>CO</state>
    <street>123 Pacific Ave</street>
    <urn>urn:address:customer:Qi0KAB2YXfMAAAFVcOVB7DQp:hBIKAB2YvVMAAAFValUOPDU8</urn>
</Address>

If an address check service is active and suggestions are found:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
    <uri>inSPIRED-inTRONICS-Site/-/customers/Qi0KAB2YXfMAAAFVcOVB7DQp/addresses/hBIKAB2YvVMAAAFValUOPDU8/suggestions</uri>
</Link>

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