Related Documents
Document Properties
Kbid27D653
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 - Create new customer address


Note

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

URI

/customers/<customer-id>/addresses

OR

/customers/-/addresses (deprecated)

Http Method

POST

Short Description

Creates a new customer address by using POST data provided by the client

Query Parameters

none

Example Requests

/customers/Ik0KAB2YzNcAAAFU54ZToKlg/addresses

HTTP Status Codes

201 Created
400 Bad Request

       Possible values for header ‘error-key’:

    • customer.address.invalid_fields.usage.error
    • customer.address.missing_fields.error

401 Unauthorized

404 Not Found

       Possible values for header ‘error-key’:

    • customer.address.not_found.error

Description

POST-ing to this resource will create a new customer address. 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.CustomerAddressListResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO

Request Example

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

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressListResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO
OR
om.intershop.component.rest.capi.resourceobject.LinkRO

Response Example

201 Created

{
    "type": "Link",
    "title": "Patricia Miller, Berliner Str. 20, Potsdam",
	"uri": "inSPIRED-inTRONICS-Site/-/customers/Ik0KAB2YzNcAAAFU54ZToKlg/addresses/BOIKDgAOdNQAAAFCc_ZOHHCV"
 }

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressListResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO
OR
om.intershop.component.rest.capi.resourceobject.LinkRO

XML Request Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Address>
    <firstName>Patricia</firstName>
    <lastName>Miller</lastName> 
    <addressLine1>Berliner Str. 20</addressLine1>   
    <city>Potsdam</city>
    <postalCode>14482</postalCode>
    <countryCode>DE</countryCode>
    <mainDivision>Brandenburg</mainDivision>   
    <phoneHome>049364112677</phoneHome>  
</Address>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.address.CustomerAddressListResource
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO
OR
om.intershop.component.rest.capi.resourceobject.LinkRO

XML Response Example

201 Created

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
  <title>Patricia Miller, Berliner Str. 20, Potsdam</title>
  <uri>inSPIRED-inTRONICS-Site/-/customers/Ik0KAB2YzNcAAAFU54ZToKlg/addresses/BOIKDgAOdNQAAAFCc_ZOHHCV/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