Skip to content

Update Customer Address

Update an existing address in the customer's address book.

Endpoint

PUT /api/shop/customer-addresses/{addressId}

URL Parameters

ParameterTypeRequiredDescription
addressIdintegerYesAddress ID to update

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Request Body

json
{
  "firstName": "Jane",
  "lastName": "Doe",
  "companyName": "Updated Corp.",
  "vatId": "DE987654321",
  "email": "[email protected]",
  "phone": "9876543210",
  "address1": "789 Pine Rd",
  "address2": "Suite 300",
  "city": "Los Angeles",
  "state": "CA",
  "country": "US",
  "postcode": "90002"
}

Request Parameters

ParameterTypeRequiredDescription
firstNamestringNoFirst name
lastNamestringNoLast name
companyNamestringNoCompany name
vatIdstringNoVAT identification number
emailstringNoEmail address
phonestringNoPhone number
address1stringNoStreet address line 1
address2stringNoStreet address line 2
citystringNoCity
statestringNoState/Province
countrystringNoCountry code
postcodestringNoPostal code
defaultAddressbooleanNoSet as default address

Response Fields (200 OK)

FieldTypeDescription
addressobjectUpdated address details
messagestringSuccess message

Validation Rules

  • Address must belong to customer
  • Country/State must be valid if provided
  • Cannot update other customer's addresses

Use Cases

  • Correct address information
  • Update phone number
  • Change city/state
  • Modify street address
  • Update postal code
  • Update company/VAT details

Released under the MIT License.