Get user information on the home page

Good evening everyone,

is there any query or call I can make to retrieve user address information to the home page, for example? Without going through the orderForm

Hi Guilherme,

If the customer doesn’t have an account in the store yet, the best approach would be through the orderForm itself, especially using the Shopper Location app.

However, if the customer already has an account, it’s possible to retrieve the registered address using the Search documents API from Master Data. Just search the address Data Entity (by default the acronym would be AD) and define an easy search term like the email address, as shown in the example below:

https://{{accountName}}.vtexcommercestable.com.br/api/dataentities/AD/search?_fields=_all&_where=(userId={{userEmail}}) 

Eduardo Luciano
Field Software Engineer | VTEX

Hello @eduardo.luciano, this is exactly what I needed. Thank you so much!