Update User Address
API operation: Open the endpoint in Scalar
Use PUT /users/{user_id}/addresses/{address_id} to update a user address. The operation is Address.update.
The operation requires authentication. Administrators and agents can act for another user; other callers must match user_id. The address lookup may be scoped by address_id without also enforcing the route user_id; verify that both identifiers match before making this update. Setting default to true clears the default flag on the user's other addresses.
const response = await ordering.users(userId).addresses(addressId).save();
This SDK syntax is historical. Confirm the package and version before using it. See User address model.
OpenAPI reference
Operation: PUT /users/{user_id}/addresses/{address_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
user_id | integer | Yes | — |
address_id | integer | Yes | — |
Request body fields
| Name | Type | Required |
|---|---|---|
address | any | No |
address_notes | any | No |
cellphone | any | No |
city | any | No |
country | any | No |
country_code | any | No |
default | boolean | No |
external_id | any | No |
internal_number | any | No |
lastname | any | No |
locality | any | No |
location | string | No |
middle_name | any | No |
name | any | No |
neighborhood | any | No |
phone | any | No |
route | any | No |
second_lastname | any | No |
state | any | No |
state_code | any | No |
street_number | any | No |
sublocality | any | No |
user_id | number | No |
zipcode | any | No |
Responses
| Code | Description |
|---|---|
| 200 | OK (Envelope) |
| 400 | Bad Request (ErrorResponse) |
| 401 | Unauthorized |
| 404 | Not Found |
| 429 | Too Many Requests (ErrorResponse) |
| 500 | Internal Server Error (ErrorResponse) |
| 503 | Service Unavailable (ErrorResponse) |