Skip to main content

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

NameTypeRequiredDescription
user_idintegerYes—
address_idintegerYes—

Request body fields

NameTypeRequired
addressanyNo
address_notesanyNo
cellphoneanyNo
cityanyNo
countryanyNo
country_codeanyNo
defaultbooleanNo
external_idanyNo
internal_numberanyNo
lastnameanyNo
localityanyNo
locationstringNo
middle_nameanyNo
nameanyNo
neighborhoodanyNo
phoneanyNo
routeanyNo
second_lastnameanyNo
stateanyNo
state_codeanyNo
street_numberanyNo
sublocalityanyNo
user_idnumberNo
zipcodeanyNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference