Update address by ID
This endpoint allows you to update an existing address document in the AD data entity. Partially updates a customer address.
⚠️ When updating addresses you must send each field according to the specifications provided. Otherwise, the Checkout module will not be able to autofill data during the shopping flow, which can block the purchase. Learn more about SmartCheckout - Customer information automatic fill-in.
Permissions
Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:
| Product | Category | Resource |
|---|---|---|
| Dynamic Storage | Dynamic storage generic resources | Insert or update document (not remove) |
| Dynamic Storage | Dynamic storage generic resources | Full access to all documents |
| Dynamic Storage | Dynamic storage generic resources | Master Data administrator |
There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see Authentication overview.
❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.
Path parameters
ID of the address to update.
Query parameters
Name of the schema that the document complies with. This field is required when using _where or _fields query parameters.
Headers
Type of the content being sent.
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Request body
Example request
{
"addressName": "My house",
"addressLabel": "NC Office",
"addressType": "commercial",
"receiverName": "Clark Kent.",
"city": "Raleigh",
"state": "NC",
"country": "USA",
"postalCode": "12345",
"street": "Main Street",
"number": "300",
"neighborhood": "Downtown",
"complement": "3rd floor",
"reference": "Next to the park",
"geoCoordinate": "40.7128,-74.0060",
"userId": "7e03m794-a33a-11e9-84rt6-0adfa64s5a8e"
}Response
OK