Related Documents
Document Properties
KbidX25092
Last Modified07-Sep-2016
Added to KB28-Aug-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7

REST API - Create private customer (until 7.7)

URI

/customers

Http Method

POST

Short Description

Creates a private customer

Query Parameters

none

Example Requests

/customers

HTTP Status Codes

201 Created
400 Bad Request

Possible values for header value "error-key":

customer.already_exists.error

customer.customerno.already_exists.error

customer.missing_fields.error

customer.invalid_fields.error

customer.credentials.missing_fields.error

customer.credentials.login.not_acceptable.error

customer.credentials.login.not_unique.error

customer.credentials.password.invalid.error

customer.address.missing_fields.error

409 Conflict

Description

Creates an individual customer. It is possible when there is no customer logged in into the system.

Cartridge

app_sf_rest, app_sf_rest_b2c

Application

B2C Web Shop

Product Version

7.4

Product To Version

7.7

Status

final

JSON

Request Data Format

application/json

Request related java object

com.intershop.sellside.rest.b2c.capi.resource.customer.PrivateCustomerListResource
com.intershop.sellside.rest.b2c.capi.resourceobject.NewCustomerRO
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO
com.intershop.sellside.rest.common.capi.resourceobject.CredentialsRO

Request Example

{
      "customerNo" : "NewCustomer",
      "title" : "Mr",
      "firstName" : "Patrik",
      "lastName" : "Mueller",
      "birthday" : "1970-03-10",
      "phoneHome" : "4211324",
      "phoneBusiness" : "4211324",
      "phoneMobile" : "42311324",
      "fax" : "4211324",   
      "email" : "patrik@test.intershop.net",
      "preferredLanguage" : "de_DE",
      "credentials": {
          "login" : "patrik@test.intershop.net",
          "password" : "!InterShop00!",
          "securityQuestion" : "Who was your first lover?",
          "securityQuestionAnswer" : "Unknown"
      },
      "address": {
          "addressName" : "MyNewAddress",
          "email" : "patrik@test.intershop.net",
          "firstName" : "Patrik",
          "lastName" : "Mueller",
          "countryCode" : "DE",
          "postalCode" : "14482",
          "city" : "Potsdam",
          "street" : "Berliner Str."
      }
}

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.b2c.capi.resource.customer.PrivateCustomerListResource

Response Example

{
    "type": "Link",
    "uri": "PrimeTech-PrimeTechSpecials-Site/-/customers/-"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.b2c.capi.resource.customer.PrivateCustomerListResource
com.intershop.sellside.rest.b2c.capi.resourceobject.NewCustomerRO
com.intershop.sellside.rest.common.capi.resourceobject.AddressRO
com.intershop.sellside.rest.common.capi.resourceobject.CredentialsRO 

XML Request Example

<NewCustomer>
	<customerNo>NewCustomer</customerNo>
	<email>patrik@test.intershop.net</email>
	<fax>7878676</fax>
	<firstName>Patrik</firstName>
	<birthday>1985-03-10</birthday>
	<lastName>Mueller</lastName>
	<phoneBusiness>1000000</phoneBusiness>
	<phoneHome>455454</phoneHome>
	<phoneMobile>44535</phoneMobile>
	<preferredLanguage>en_US</preferredLanguage>
	<title>Mr</title>
	<credentials>
		<login>patrik@test.intershop.net</login>
		<password>!InterShop00!</password>
		<securityQuestion>Who was your first lover</securityQuestion>
		<securityQuestionAnswer>Unknown</securityQuestionAnswer>
	</credentials>
	<address>
		<addressName>MyNewAddress</addressName>
		<email>patrik@test.intershop.net</email>
		<firstName>Patrik</firstName>
		<lastName>Mueller</lastName>
		<country>DE</country>
		<countryCode>DE</countryCode>
		<postalCode>DE</postalCode>
		<city>Potsdam</city>
		<street>Berliner Str.</street>
	</address>
</NewCustomer>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.b2c.capi.resource.customer.PrivateCustomerListResource
com.intershop.sellside.rest.b2c.capi.resourceobject.NewCustomerRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
  <title>customers</title>
  <uri>PrimeTech-PrimeTechSpecials-Site/-/customers/-</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
Tickets