Update a Customer Address

Service URL: PUT /customers/addresses/{addressId}

Tokens:

addressId – The id of the address to update

Request Body:

addressAndContact – IAddressAndContact – The address with associated contact details to add to the customer

Remarks:

This service is used to update an existing address associated with the customer. The address may include a phone number and mobile phone number. This service can also be used to change the preferred contact and delivery addresses, in which case the existing preferred contact and delivery address is changed to not have the preferred flag.

Example Request:

PUT: http://localhost:8080/WebRestApi/rest/customers/addresses/2
Content-Type: application/json

{
  "@entity" : "retail:updateCustomerAddressRequest",
  "address" : {
    "@entity" : "retail:address",
    "country" : "UK",
    "countryCodeId" : {
      "@entity" : "retail:countryCodeKey"
    },
    "organisation" : "Enactor Limited Work",
    "typeId" : {
      "@entity" : "retail:contactTypeKey",
      "id" : "ADDRESS WORK"
    },
    "county" : "Hertfordshire",
    "street1" : "1 Bluecoats Avenune",
    "town" : "Hertord",
    "isTemplate" : false
  }
}

Example Response:

Status: 200 OK
Go to Top