Skip to main content

Update customer address

PATCH 

/v2/customers/:lookupKey/:lookupValue/addresses/:addressId

Update an existing address for a specific customer with partial or complete address information.

Key Features

  • Partial Updates: Update only the fields provided in the request body
  • Flexible Customer Lookup: Update address using internal ID or external source ID
  • Address Validation: Validates updated fields according to business rules
  • Default Address Management: Handles default address reassignment when needed

Business Rules

  • Address must exist and belong to the specified customer
  • Only provided fields will be updated, others remain unchanged
  • Default address reassignment affects other addresses of the same type
  • Address type cannot be changed through updates
  • Postal code validation applies to updated postal codes

Validation Rules

  • Updated street address must be non-empty if provided
  • Updated city and country must be valid if provided
  • Updated postal code format validation based on country
  • Contact name fields have length restrictions when updated
  • Email format validation when email is updated

Use Cases

  • Address Corrections: Fix incorrect address information
  • Contact Updates: Update contact names or phone numbers
  • Default Changes: Change which address is marked as default
  • System Synchronization: Update addresses from external systems

Request

Responses

Address updated successfully