update_customer_address
Modify an existing customer address by providing the customer ID and address ID; only the fields you specify are updated.
Instructions
Update an existing customer address. Only provided fields are modified. To set this address as default, use set_default_customer_address (Sapo dedicated endpoint). IMPORTANT: When changing subdivision fields, pass BOTH the text name AND the code (e.g. province + province_code together) — codes alone are silently dropped. Sapo write API only accepts the pre-2025 3-tier schema; new 2-tier addresses cannot be written via this endpoint (returns 422 "Ward is not supported").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | ||
| city | No | ||
| ward | No | ||
| phone | No | ||
| company | No | ||
| country | No | Country name (e.g. "Vietnam"). | |
| address1 | No | Primary address line. | |
| address2 | No | ||
| district | No | ||
| province | No | Vietnamese province name (e.g. "Hà Nội"). | |
| last_name | No | ||
| ward_code | No | ||
| address_id | Yes | Address ID to update. Required. | |
| first_name | No | ||
| customer_id | Yes | Customer ID. Required. | |
| country_code | No | ||
| district_code | No | ||
| province_code | No |