Update an Email Address

Service URL: PUT /customers/emailAddresses/{emailAddressId}

Tokens:

emailAddressId – The id of the email address to update

Request Body:

emailAddressDetails – IEmailAddress – The new email address details for the customer

Remarks:

This service can update an existing email address for the customer. This service can also change the preferred email address for the customer. If so, the existing preffered email address is updated to clear the preferred flag.

Example Request:

PUT http://localhost:8080/WebRestApi/rest/customers/emailAddresses/1
Content-Type: application/json

{
  "@entity" : "retail:updateCustomerEmailAddressRequest",
  "emailAddress" : {
    "@entity" : "retail:emailAddress",
    "emailAddress" : "john.smith@example.co.uk",
    "preferred" : false,
    "typeId" : {
      "@entity" : "retail:contactTypeKey",
      "id" : "EMAIL_HOME"
    },
    "active" : true
  }
}

Example Response:

Success: 200 OK
Go to Top