Update Customer Address
Update an existing address in the customer's address book.
Endpoint
PUT /api/shop/customer-addresses/{addressId}URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
addressId | integer | Yes | Address ID to update |
Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer 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
| Parameter | Type | Required | Description |
|---|---|---|---|
firstName | string | No | First name |
lastName | string | No | Last name |
companyName | string | No | Company name |
vatId | string | No | VAT identification number |
email | string | No | Email address |
phone | string | No | Phone number |
address1 | string | No | Street address line 1 |
address2 | string | No | Street address line 2 |
city | string | No | City |
state | string | No | State/Province |
country | string | No | Country code |
postcode | string | No | Postal code |
defaultAddress | boolean | No | Set as default address |
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
address | object | Updated address details |
message | string | Success 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

