Feature Pack 4Feature Pack 5Feature Pack 6

Add a new contact to address book

The following example shows how to add a new contact to address book.

Request


POST /wcs/resources/store/10101/person/@self/contact HTTPS/1.1
Host: wcstestserver.raleigh.ibm.com
Content-Type: application/json

{
   "nickName" : "Mary",
   "firstName" : "Mary",
   "lastName" : "Smith",
   "addressType" : "ShippingAndBilling",
   "zipCode" : "12345",
   "addressLine": [
      		"100 main st.",
      		"Suite 100",
      		""
      		],
   "city" : "RTP",
   "state" : "North Carolina",
   "country" : "United States",
   "zipCode" : "12345",
   "email1" : "abc@xyz.com",
   "email2" : "user1@abc.com",
   "phone1" : "9191234567"
}

Response


HTTPS/1.1 201 Created
Content-Type: application/json

{
	"userId": "9004"
}