Documentation
Feedback
Guides
API Reference

Guides
CheckoutShopping CartIgnore profile data from cart
Ignore profile data from cart

The shopping cart is where the information on the products chosen by the customer while browsing a store is gathered. This data may include item prices, shipping value, payment, and delivery methods, among others.

All VTEX store user profile information is stored in the Master Data. Through this information, it is possible to automatically fill in the customer's data in the cart using the registered email (SmartCheckout).

This guide will describe how to disable the automatic inclusion of user profile data through the email registered in a shopping cart.

Getting and accessing shopping cart information

The first step is to get the orderFormId and access the shopping cart information that you want to ignore profile data. For more information, access the Get cart information by ID guide.

When accessing shopping cart information, make sure that the clientProfileData has not been sent to the cart, which is indicated in the example below:


_10
...
_10
"clientProfileData": null
_10
...

The request Ignore profile data will only work if the clientProfileData information has not been sent to the cart yet (as shown above). If the cart already has a clientProfileData information, the response status will be 403 Forbidden error, with an Access Denied message.

Example of a cart containing customer profile data, and in which the request Ignore profile data cannot be applied:


_19
...
_19
"clientProfileData": {
_19
"email": "clark.kent@examplemail.com",
_19
"firstName": "Clark",
_19
"lastName": "Kent",
_19
"document": "44444444444",
_19
"documentType": "cpf",
_19
"phone": "+5511123456789",
_19
"corporateName": null,
_19
"tradeName": null,
_19
"corporateDocument": null,
_19
"stateInscription": null,
_19
"corporatePhone": null,
_19
"isCorporate": false,
_19
"profileCompleteOnLoading": false,
_19
"profileErrorOnLoading": false,
_19
"customerClass": null
_19
},
_19
...

Disabling profile data from the shopping cart

The orderFormId information of the shopping cart must be sent through the URL request, as shown by the URL example below:

https://{accountname}.{environment.com.br}/api/checkout/pub/orderForm/9620cbb7ebc34ca68a86621428816c5a/profile

Additionally, you need to send the request body containing the parameter ignoreProfileData set as false or true to define whether profile data should be ignored.

See below an example of the request body:


_10
{
_10
"ignoreProfileData": false
_10
}

After sending the request, the endpoint will return the response body with all fields of the object clientProfileData shown as null.


_19
...
_19
"clientProfileData": {
_19
"email": null,
_19
"firstName": null,
_19
"lastName": null,
_19
"document": null,
_19
"documentType": null,
_19
"phone": null,
_19
"corporateName": null,
_19
"tradeName": null,
_19
"corporateDocument": null,
_19
"stateInscription": null,
_19
"corporatePhone": null,
_19
"isCorporate": false,
_19
"profileCompleteOnLoading": null,
_19
"profileErrorOnLoading": null,
_19
"customerClass": null
_19
},
_19
...

Error codes

The following errors may appear as a message in the response body.

400 - Bad Request

  • Message error example (code ORD002): "Invalid order form". The orderFormId information is not valid.

_10
{
_10
"fields": {},
_10
"error": {
_10
"code": "ORD002",
_10
"message": "Invalid order form",
_10
"exception": null
_10
},
_10
"operationId": "4ae9e8e4-0fd1-469a-99b1-71705cbe036f"
_10
}

403 - Forbidden

  • Message error example (code CHK003): "Access Denied". The request was sent to a cart that already has clientProfileData information. Before processing this request, please delete all client information via the Remove all personal data endpoint.

_10
{
_10
"fields": {},
_10
"error": {
_10
"code": "CHK003",
_10
"message": "Access Denied",
_10
"exception": null
_10
},
_10
"operationId": "4ae9e8e4-0fd1-469a-99b1-71705cbe036f"
_10
}

404 - Not Found

  • Message error example: "The requested URL was not found on the server". Check that the URL data is correct.

_10
<body>
_10
<h1>404 Not Found</h1>
_10
<p>The requested URL was not found on this server.</p>
_10
</body>

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page