patch https://{accountName}.{environment}.com.br/api/dataentities//documents/
This request allows you to partially update a document corresponding to a given data entity. For example, you can update some fields of a customer profile or address.
You can use this request to update documents for any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update.
Example use cases
Client profile
In order to update a customer profile's phone
and isNewsletterOptIn
fields, choose the CL
data entity and send a request similar to this:
PATCH
https://examplestore.vtexcommercestable.com.br/api/dataentities/CL/documents/123456789abc
Request body
{
"phone": "+12025550195",
"isNewsletterOptIn": false
}
Client address
In order to update the receiverName
of an existing address, the data entity is AD
and the request would look like this:
PATCH
https://examplestore.vtexcommercestable.com.br/api/dataentities/AD/documents/123456789abc
Request body
{
"receiverName": "Lois Lane"
}