[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides vtex io documentation managing url redirects in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/updates/release-notes)

Storefront Development

[Getting started with storefront solutions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/getting-started-with-storefront-solutions)

---

[FastStore](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/faststore)

---

[Store Framework](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework)

[Store Theme](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-store-theme)

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/getting-started-3)

Concepts

[Building pages](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-building-pages)

[Using components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-using-components)

[Using advanced layouts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-using-advanced-layouts)

[Working with Site Editor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-working-with-site-editor)

[Styling](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-styling)

[Dealing with events](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-dealing-with-events)

[Configuring Analytics (Google Tag Manager)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-configuring-analytics-google-tag-manager)

[Setting up cross-border stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-setting-up-cross-border-stores)

[Handling internationalization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-multi-language-stores)

[Routing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-routing)

[Adding custom headers to your Store Framework store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-adding-custom-headers-to-your-store-framework-store)

[Best practices for associating a custom page with a content type](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-best-practices-for-associating-a-custom-page-with-a-content-type)

[Customizing your 404 page](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-customizing-your-404-page)

[Enabling 404 pages for invalid single-segment paths](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-enabling-404-pages-for-invalid-single-segment-paths)

[Managing URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects)

[Using several service workers in your store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-using-several-service-workers-in-your-store)

[Managing performance](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-managing-performance)

[Improving store accessibility with semantic HTML migration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-semantic-html-migration)

[Going live](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-go-live)

[Updating live stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-updating-live-stores)

---

(Legacy) CMS Portal

---

[Storefront best practices](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/storefront-best-practices)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/updates/release-notes)

Storefront Development

[Getting started with storefront solutions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/getting-started-with-storefront-solutions)

---

[FastStore](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/faststore)

---

[Store Framework](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework)

[Store Theme](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-store-theme)

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/getting-started-3)

Concepts

[Building pages](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-building-pages)

[Using components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-using-components)

[Using advanced layouts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-using-advanced-layouts)

[Working with Site Editor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-working-with-site-editor)

[Styling](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-styling)

[Dealing with events](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-dealing-with-events)

[Configuring Analytics (Google Tag Manager)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-configuring-analytics-google-tag-manager)

[Setting up cross-border stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-setting-up-cross-border-stores)

[Handling internationalization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-multi-language-stores)

[Routing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-routing)

[Adding custom headers to your Store Framework store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-adding-custom-headers-to-your-store-framework-store)

[Best practices for associating a custom page with a content type](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-best-practices-for-associating-a-custom-page-with-a-content-type)

[Customizing your 404 page](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-customizing-your-404-page)

[Enabling 404 pages for invalid single-segment paths](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-enabling-404-pages-for-invalid-single-segment-paths)

[Managing URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects)

[Using several service workers in your store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-using-several-service-workers-in-your-store)

[Managing performance](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-managing-performance)

[Improving store accessibility with semantic HTML migration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-semantic-html-migration)

[Going live](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-go-live)

[Updating live stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-updating-live-stores)

---

(Legacy) CMS Portal

---

[Storefront best practices](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/storefront-best-practices)

---

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/storefront-development)

[Store Framework](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework)

[Routing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/store-framework-routing)

[Managing URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects)

Managing URL redirects

Learn how to manage your store's URL redirects to prevent 404 errors.

URL redirection is a method of forwarding website visitors and search engines from one URL to another. Redirects might be useful when you need to move content to a new URL, remove an old product page, or forward users from a specific region to a custom page. Implementing the appropriate redirects can improve the user experience by preventing visitors from hitting 404 error pages.

Check the following sections to learn how to [create](#creating-url-redirects), [remove](#deleting-url-redirects), and [verify](#verifying-url-redirects) your store's URL redirects.

## Before you begin

1. [Install the VTEX IO Command-Line Interface (CLI)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference).
2. [Install the redirects plugin for the VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23installing-a-plugin):

`1

vtex plugins install redirects

`

## Creating URL redirects

1. Using the [CSV file template](#csv-file-template) as a reference, create a `.csv` file containing the redirects you wish to create.
2. Save the file under the name of your choice.
3. Open the terminal and log in to your VTEX account.
4. Import redirects to your account by running the following command:
   * _Replace `{CSVpath}` with the path to your `.csv` file._
`1
vtex redirects import {CSVpath}
`

Once your file is processed, the redirects will take effect. Please keep in mind that this may take some time.

## Deleting URL redirects

1. Using the [CSV file template](#csv-file-template) as a reference, create a `.csv` file with the redirects you wish to delete.
2. Save the file under the name of your choice.
3. Open the terminal and log in to your VTEX account.
4. Delete redirects from your account by running the following command:
   * _Replace `{CSVpath}` with the path to your `.csv` file._
`1
vtex redirects delete {CSVpath}
`

## Verifying URL redirects

1. Open the terminal and log in to your VTEX account.
2. Retrieve the full list of your store's redirects into a `.csv` file by running the following command.
   * _Replace `{fileName}` with any name of your choice._
`1
vtex redirects export {fileName}.csv
`

After running this command, a file named `{fileName}.csv` containing all the redirects of your store will be created in your current directory.

Check the [CSV file template](#csv-file-template) to understand the meaning of each field of the `.csv` file generated.

## CSV file template

To create or delete URL redirects in your store, you must create a `.csv` file as in the following example.

![{"base64":"  ","img":{"width":501,"height":130,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":2854,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/redirects.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/redirects.png)

Notice that the file must contain a row with four columns and the following values:

| Property name | Description                                                                                | Example   |
| ------------- | ------------------------------------------------------------------------------------------- | --------- |
| from          | Original path.                                                                              | /blouse/p |
| to            | Relative path or full URL to which you want to redirect your visitors.                      | /shirts/p |
| type          | Redirect type. TEMPORARY or PERMANENT                                                       | TEMPORARY |
| endDate       | **Only for TEMPORARY redirects**. Expiration date of the redirect on the format mm/dd/yyyy. | 5/20/2020 |

> You must not modify this row. Otherwise, you will not be able to create or delete redirects.

Under the first row of your `.csv` file, enter the `from`, `to`, `type`, and `endDate` values corresponding to the redirects you want to create or delete, as in the following example:

![{"base64":"  ","img":{"width":499,"height":130,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":6774,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/redirects2.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/redirects2.png)

Keep in mind that:

* The `from` column can only receive relative paths.
* The `to` column can receive either relative paths (e.g., `/shirts/p`) or full URLs (e.g., `https://myotherstore.com`).

> You cannot create redirects using wildcards or variables. You must specify each redirect using relative paths or full URLs.

* `TEMPORARY` redirects receive the `302` status code, while `PERMANENT` redirects receive the `301` status code.
* The `endDate` must be left empty if the redirect is `PERMANENT`.

[Creating URL redirects 🔼](#creating-url-redirects)

[Removing URL redirects 🔼](#deleting-url-redirects)

[Verifying URL redirects 🔼](#verifying-url-redirects)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F112641072%3Fv%3D4%26w=64%26q=75)](https://github.com/barbara-celi)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Storefront-Guides/pages/vtex-io-documentation-managing-url-redirects.md)

[Enabling 404 pages for invalid single-segment paths« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects//docs/guides/vtex-io-documentation-enabling-404-pages-for-invalid-single-segment-paths)[Using several service workers in your storeNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects//docs/guides/vtex-io-documentation-using-several-service-workers-in-your-store)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F112641072%3Fv%3D4%26w=64%26q=75)](https://github.com/barbara-celi)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23before-you-begin)

[Creating URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23creating-url-redirects)

[Deleting URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23deleting-url-redirects)

[Verifying URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23verifying-url-redirects)

[CSV file template](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23csv-file-template)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Storefront-Guides/pages/vtex-io-documentation-managing-url-redirects.md)

Copy page

On this page

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23before-you-begin)

[Creating URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23creating-url-redirects)

[Deleting URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23deleting-url-redirects)

[Verifying URL redirects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23verifying-url-redirects)

[CSV file template](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-url-redirects/docs/guides/vtex-io-documentation-managing-url-redirects%23csv-file-template)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides update cart items in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-api-overview)

[Custom Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/custom-data-1)

[Customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/customization)

[Discounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/discounts)

[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/features)

[Order Placement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/orders-2)

[Security](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-security)

[Shopping Cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/shopping-cart-section-api-quick-start-guides)

[Simulate a shopping cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/simulate-a-shopping-cart)

[Get current or create a new cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/create-a-new-cart)

[Get cart information by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/get-cart-information-by-id)

[Remove all items from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/remove-all-items-from-cart)

[Remove all personal data from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/remove-all-personal-data)

[Add cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-cart-items)

[Update cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items)

[Change the price of an SKU in a cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/change-price)

[Ignore profile data from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/ignore-profile-data)

[Get cart installments information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/get-cart-installments-information)

[Add coupons to the cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-coupons-to-the-cart)

[Add a service (offering) to a shopping cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-service-to-the-cart)

[Cart Attachments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/cart-attachments-section-api-quick-start-guides)

[Configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/configuration-section-api-quick-start-guides)

[Fulfillment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/fulfillment-checkout-section-api-quick-start-guides)

[Region](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/region-section-api-quick-start-guides)

[Checkout error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-error-codes)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/data-protection-plus)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-api-overview)

[Custom Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/custom-data-1)

[Customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/customization)

[Discounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/discounts)

[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/features)

[Order Placement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/orders-2)

[Security](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-security)

[Shopping Cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/shopping-cart-section-api-quick-start-guides)

[Simulate a shopping cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/simulate-a-shopping-cart)

[Get current or create a new cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/create-a-new-cart)

[Get cart information by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/get-cart-information-by-id)

[Remove all items from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/remove-all-items-from-cart)

[Remove all personal data from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/remove-all-personal-data)

[Add cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-cart-items)

[Update cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items)

[Change the price of an SKU in a cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/change-price)

[Ignore profile data from cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/ignore-profile-data)

[Get cart installments information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/get-cart-installments-information)

[Add coupons to the cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-coupons-to-the-cart)

[Add a service (offering) to a shopping cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/add-service-to-the-cart)

[Cart Attachments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/cart-attachments-section-api-quick-start-guides)

[Configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/configuration-section-api-quick-start-guides)

[Fulfillment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/fulfillment-checkout-section-api-quick-start-guides)

[Region](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/region-section-api-quick-start-guides)

[Checkout error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-error-codes)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/data-protection-plus)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides)

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/checkout-api-overview)

[Shopping Cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/shopping-cart-section-api-quick-start-guides)

[Update cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items)

Update cart items

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.

This guide will describe how to modify the quantity of an item in the cart or remove it by the API.

>  To remove all items from the cart at the same time, use the [Remove all items](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-rest-api/reference/removeallitems) endpoint.

## Getting shopping cart information

The first step is to get the `orderFormId` of the shopping cart that you want to update cart items information. For more information, access the [Get cart information by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-rest-api/docs/get-cart-information-by-id) guide.

## Updating shopping cart items quantity

To update items in the shopping cart, you need to use the [Update cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-rest-api/reference/itemsupdate) endpoint. In this request, you must send the following information through the URL:

* **Path param**: `orderFormId` value.
* **Query param**: `allowedOutdatedData`. You can set up this query as `false` or `true` to define whether some cart information can be updated through the minicart.

See a URL example below:

`https://accountname.environment.com.br/api/checkout/pub/orderForm/ede846222cd44046ba6c638442c3505a/items?allowedOutdatedData=paymentData`

Additionally, you need to send the request body containing the `index` (item's position in the array or cart) and the new `quantity` value. See a request body example below:

`1

{

2

 "orderItems": [

3

 {

4

 "quantity": 3,

5

 "index": "1"

6

 }

7

 ]

8

}

`

After sending the request, the endpoint will return the response body with the shopping cart information containing the new item quantity information.

`1

...

2

"items": [

3

 {

4

 "uniqueId": "BAE0177A615A4EB1B261DDF3274076F8",

5

 "id": "5",

6

 "productId": "7",

7

 "productRefId": "",

8

 "refId": null,

9

 "ean": "978020137962",

10

 "name": "Ultra Moisturizing Milk Conditioner 100 ml",

11

 "skuName": "100 ml",

12

 "modalType": null,

13

 "parentItemIndex": null,

14

 "parentAssemblyBinding": null,

15

 "assemblies": [],

16

 "priceValidUntil": "2023-11-08T18:01:42Z",

17

 "tax": 0,

18

 "price": 4490,

19

 "listPrice": 4490,

20

 "manualPrice": null,

21

 "manualPriceAppliedBy": null,

22

 "sellingPrice": 448840,

23

 "rewardValue": 0,

24

 "isGift": false,

25

 "additionalInfo": {

26

 "dimension": null,

27

 "brandName": "VALDIE&CO",

28

 "brandId": "2000000",

29

 "offeringInfo": null,

30

 "offeringType": null,

31

 "offeringTypeId": null

32

 },

33

 "preSaleDate": null,

34

 "productCategoryIds": "/4/1/",

35

 "productCategories": {

36

 "1": "Treatments",

37

 "4": "Stylers"

38

 },

39

 "quantity": 3,

40

 "seller": "cosmetics1",

41

 "sellerChain": [

42

 "cosmetics1"

43

 ],

44

 "imageUrl": "http://cosmetics2.vteximg.com.br/arquivos/ids/155403-55-55/Ultra-Moisturizing-Milk-Conditioner.jpg?v=637109315995300000",

45

 "detailUrl": "/ultra-moisturizing-milk-conditioner/p",

46

 "components": [],

47

 "bundleItems": [],

48

 "attachments": [],

49

 "attachmentOfferings": [],

50

 "offerings": [],

51

 "priceTags": [

52

 {

53

 "name": "discount@price-0e45a4e3-6084-4bf9-bff7-0fe8403699fc#e5b461db-58da-46a0-87b9-fbab27c5caad",

54

 "value": -480,

55

 "rawValue": -4.8,

56

 "isPercentual": false,

57

 "identifier": "0e45a4e3-6084-4bf9-bff7-0fe8403699fc",

58

 "owner": "cosmetics2"

59

 }

60

 ],

61

 "availability": "cannotBeDelivered",

62

 "measurementUnit": "mg",

63

 "unitMultiplier": 100.0000,

64

 "manufacturerCode": null,

65

 "priceDefinition": {

66

 "calculatedSellingPrice": 448840,

67

 "total": 1346520,

68

 "sellingPrices": [

69

 {

70

 "value": 448840,

71

 "quantity": 3

72

 }

73

 ]

74

 }

75

 },

76

...

`

>  For more information about the meaning of each of the fields available in the shopping cart, access the [orderForm](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/orderform-fields) overview." } \[/block\]

## Removing shopping cart items

To remove an item from the cart you must use the same endpoint and parameters as in the previous section ([Updating shopping cart items quantity](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23updating-shopping-cart-items-quantity)). However, the `quantity` value to be sent in the request body must be `0`. See a request body example below:

`1

...

2

{

3

 "orderItems": [

4

 {

5

 "quantity": 0,

6

 "index": 1

7

 }

8

 ]

9

}

10

...

`

After sending the request, the endpoint will return the response body with the shopping cart information without the removed item.

## 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.

`1

{

2

 "fields": {},

3

 "error": {

4

 "code": "ORD002",

5

 "message": "Invalid order form",

6

 "exception": null

7

 },

8

 "operationId": "5d9f54e6-7db4-46d6-bca9-deeb278b8b98"

9

}

`

* **Message error example (code CHK0023)**: `"Invalid quantity for the item"`. This message indicates that the `quantity` value (mandatory) has not been sent in the request body.

`1

{

2

 "fields": {},

3

 "error": {

4

 "code": "CHK0023",

5

 "message": "Invalid quantity for item",

6

 "exception": null

7

 },

8

 "operationId": "5d9f54e6-7db4-46d6-bca9-deeb278b8b98"

9

}

`

* **Message error example (code CHK0041)**: `"Invalid item index"`. This message indicates that the `index` used in the request does not exist or is incorrect.

`1

{

2

 "fields": {},

3

 "error": {

4

 "code": "CHK0041",

5

 "message": "Invalid item index",

6

 "exception": null

7

 },

8

 "operationId": "5d9f54e6-7db4-46d6-bca9-deeb278b8b98"

9

}

`

### 404 - Not Found

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

`1

<body>

2

 <h1>404 Not Found</h1>

3

 <p>The requested URL was not found on this server.</p>

4

</body>

`

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Checkout/shopping-cart-section-api-quick-start-guides/update-cart-items.md)

[Add cart items« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items//docs/guides/add-cart-items)[Change the price of an SKU in a cartNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items//docs/guides/change-price)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Getting shopping cart information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23getting-shopping-cart-information)

[Updating shopping cart items quantity](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23updating-shopping-cart-items-quantity)

[Removing shopping cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23removing-shopping-cart-items)

[Error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23error-codes)

[400 - Bad Request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23400-bad-request)[404 - Not Found](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23404-not-found)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Checkout/shopping-cart-section-api-quick-start-guides/update-cart-items.md)

Copy page

On this page

ON THIS PAGE

[Getting shopping cart information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23getting-shopping-cart-information)

[Updating shopping cart items quantity](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23updating-shopping-cart-items-quantity)

[Removing shopping cart items](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23removing-shopping-cart-items)

[Error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23error-codes)

[400 - Bad Request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23400-bad-request)[404 - Not Found](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/update-cart-items/docs/guides/update-cart-items%23404-not-found)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides handling errors and exceptions in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/api-usage)

[List of REST APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/getting-started-list-of-rest-apis)

[Making your first request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/making-your-first-request)

[Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/authentication)

[Response status codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/api-response-codes)

Error handling and best practices

[Handling errors and exceptions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions)

[Best practices for avoiding rate limit errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/best-practices-for-avoiding-rate-limit-errors)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/api-usage)

[List of REST APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/getting-started-list-of-rest-apis)

[Making your first request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/making-your-first-request)

[Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/authentication)

[Response status codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/api-response-codes)

Error handling and best practices

[Handling errors and exceptions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions)

[Best practices for avoiding rate limit errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/best-practices-for-avoiding-rate-limit-errors)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides)

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/api-usage)

Error handling and best practices

[Handling errors and exceptions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions)

Handling errors and exceptions

Learn how to handle errors and exceptions in VTEX API Core Commerce APIs to build resilient applications.

Handling errors and exceptions is essential for building resilient applications that can effectively navigate temporary restrictions from VTEX Core Commerce API's rate limits. Exception handling and error recovery mechanisms help your store respond gracefully to rate limit exceeded errors without impacting user interactions. They also minimize unnecessary retries and resource wastage by introducing appropriate wait times and contributing to responsible resource management.

To implement effective error handling in rate-limiting scenarios, consider the [VTEX API response status codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/api-response-codes) article and prioritize the best practices outlined in this article, with a specific emphasis on the code families of 3xx (Redirection), 4xx (Client Errors), and 5xx (Server Errors).

## Handle 3xx errors

HTTP status codes in the 3xx range are used for redirection purposes, usually demanding the user agent to take additional actions to fulfill the request.

| Error code             | Error handling strategies                                                                                |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 308 Permanent Redirect | Update the URL or endpoint used in the request to the new provided location.Ensure the redirection is valid and current at the time of the request.Confirm if the redirection is genuinely permanent rather than temporary.Update your bookmarks, links, or references to reflect the new resource location. |

## Handle 4xx errors

HTTP status codes in the 4xx range denote client errors, typically originating from issues on the client side.

| Error code             | Error handling strategies                                                                                |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400 Bad Request        | Refer to [API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference) for the expected request format.Review the request parameters.Validate the request structure and syntax.Ensure all required parameters are included.                                                                                |
| 401 Unauthorized       | Verify the authentication method used. Refer to [Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/authentication) for more information.Ensure that authentication tokens or API keys are correctly passed in the request headers.Re-authenticate with valid credentials.                                                                                |
| 403 Forbidden          | Ensure you have the appropriate [roles](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc?%26utm%5Fsource=autocomplete) to perform the desired action.Check the expiration or validity of your access credentials.                                                                                |
| 404 Not Found          | Refer to [API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference) for correct endpoint naming.Double-check the URL or endpoint for accuracy.Confirm if the resource has been moved or deleted.Check the [VTEX status page](https://read.calvincode.net/reader?url=https://status.vtex.com/) for real-time outages and incident reports. If the issue persists, reach out to [VTEX Support](https://read.calvincode.net/reader?url=https://help.vtex.com/support).                                                                                |
| 405 Method Not Allowed | Ensure the request method matches the allowed methods for the resource. Refer to [VTEX API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference) for supported methods.Check for spelling errors in the method used.                                                                                |
| 429 Too Many Requests  | Reduce the frequency of requests by optimizing code to limit unnecessary API calls or batch requests when possible.Implement an [exponential backoff strategy](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/best-practices-for-avoiding-rate-limit-errors) to gradually increase the delay between retries after receiving a 429 error.Monitor your API request patterns closely to identify any areas that may be triggering rate limits frequently and adjust accordingly.Consider implementing a queue system to better manage and distribute requests over time.In case of persistent rate limit issues, consider reaching out to [VTEX Support](https://read.calvincode.net/reader?url=https://help.vtex.com/support) for further assistance or clarification. |

## Handle 5xx errors

HTTP status codes in the 5xx range indicate server errors, revealing issues on the server side that hinder request fulfillment. Effective error handling in this category is essential for maintaining a reliable application.

| Error code                | Error handling strategies                                                                                |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 500 Internal Server Error | Check if the issue is on your end or the server's.If possible, test the same request on different tools to confirm the issue.Check the [VTEX status page](https://read.calvincode.net/reader?url=https://status.vtex.com/) for real-time outages and incident reports.Retry the request after some time, as the error might be temporary.If the issue persists, reach out to [VTEX Support](https://read.calvincode.net/reader?url=https://help.vtex.com/support).                                                                                |
| 503 Service Unavailable   | Retry the request after some time, as the error might be temporary.Check the [VTEX status page](https://read.calvincode.net/reader?url=https://status.vtex.com/) for real-time outages and incident reports.If the issue persists, reach out to [VTEX Support](https://read.calvincode.net/reader?url=https://help.vtex.com/support).                                                                                |
| 504 Gateway Timeout       | Check for potential network connectivity problems on your end.Investigate if the request payload size or complexity might be causing the timeout.Check the [VTEX status page](https://read.calvincode.net/reader?url=https://status.vtex.com/) for real-time outages and incident reports. If the issue persists, reach out to [VTEX Support](https://read.calvincode.net/reader?url=https://help.vtex.com/support).Consider [implementing retry mechanisms or backoff strategies](https://read.calvincode.net/reader?url=https://en.wikipedia.org/wiki/Exponential%5Fbackoff) to manage timeouts effectively. |

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Getting-Started/handling-errors-and-exceptions.md)

[Response status codes« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions//docs/guides/api-response-codes)[Best practices for avoiding rate limit errorsNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions//docs/guides/best-practices-for-avoiding-rate-limit-errors)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Handle 3xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-3xx-errors)

[Handle 4xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-4xx-errors)

[Handle 5xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-5xx-errors)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Getting-Started/handling-errors-and-exceptions.md)

Copy page

On this page

ON THIS PAGE

[Handle 3xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-3xx-errors)

[Handle 4xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-4xx-errors)

[Handle 5xx errors](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/handling-errors-and-exceptions/docs/guides/handling-errors-and-exceptions%23handle-5xx-errors)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides vtex io documentation migrating google tag manager app in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/updates/release-notes)

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/updates/release-notes)

Migrating Google Tag Manager app from major 2.x to major 3.x

Version 3.x of [VTEX Google Tag Manager (GTM) app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager) introduces enhanced tracking capabilities for user interactions within the store. With the integration of the `ecommerceV2` variable, this version allows for comprehensive monitoring of the user journey, capturing events from product views to completed purchases. Additionally, it allows stores to send events in both the Google Analytics 4 (GA4) format and the Universal Analytics (UA) format, facilitating a seamless transition to GA4.

## Product schema properties of GTM 3.x

To ensure consistency in product information across all areas of the store and effectively track the user's journey, Google Tag Manager 3.x introduces Enhanced Ecommerce properties to the product data schema as events. By adding these properties, stores can include additional information such as product printing, promotion, and sales data, thereby enhancing the overall tracking capabilities and maintaining a unified view of the user's journey throughout the store.

| GTM 3.x property | Type               | Description                                                                 |
| ---------------- | ------------------ | --------------------------------------------------------------------------- |
| id               | Updated property   | Product ID - Previously SKU ID.                                             |
| variant          | Updated property   | SKU ID - Previously SKU Name. The variant of the product, e.g., Rebel pink. |
| name             | Updated property   | Product Name - Previously Product Name or SKU Name.                         |
| quantity         | Unchanged property | Product quantity                                                            |
| price            | Unchanged property | Product price.                                                              |
| category         | Unchanged property | Product category, e.g., Apparel.                                            |
| brand            | Unchanged property | Product brand.                                                              |
| dimension1       | New property       | Product Reference ID.                                                       |
| dimension2       | New property       | SKU Reference ID.                                                           |
| dimension3       | New property       | SKU Name (does not include the Product Name).                               |

The `dimension1`, `dimension2`, `dimension3` properties are custom dimensions that you can use to collect and analyze data that Google Analytics does not automatically create.

For more information about custom dimensions and Enhanced Ecommerce, refer to [Custom dimensions and metrics](https://read.calvincode.net/reader?url=https://support.google.com/analytics/answer/2709828?hl=en%26ref%5Ftopic=2709827%23configuration%26zippy=%2Cin-this-article) and [Google Enhanced ecommerce official guide](https://read.calvincode.net/reader?url=https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce%23ecommerce-data) respectively.

## Migrating to GTM 3.x

To migrate to the app's 3.x version, please follow these guides:

1. [Create a Google Analytics 4 property](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-installing-google-tag-manager%23create-a-google-analytics-4-property): Refer to the "Create a Google Analytics 4 property" section and follow the instructions provided.
2. Once you have completed the setup, proceed to the [Setting up Google Tag Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-setting-up-google-tag-manager) guide for instructions on configuring events, tags, and triggers specifically for GA4.

By following these steps, you'll be able to smoothly migrate to the latest version of the app and set up events, tags, and triggers for both GA4 and UA formats.

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Storefront-Guides/google-tag-manager/vtex-io-documentation-migrating-google-tag-manager-app.md)

See also

[Vtex Google Tag ManagerGuides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-google-tag-manager)[Setting up Google Tag ManagerStorefront development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-io-documentation-setting-up-google-tag-manager)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Product schema properties of GTM 3.x](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app%23product-schema-properties-of-gtm-3x)

[Migrating to GTM 3.x](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app%23migrating-to-gtm-3x)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Storefront-Guides/google-tag-manager/vtex-io-documentation-migrating-google-tag-manager-app.md)

Copy page

On this page

ON THIS PAGE

[Product schema properties of GTM 3.x](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app%23product-schema-properties-of-gtm-3x)

[Migrating to GTM 3.x](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app/docs/guides/vtex-io-documentation-migrating-google-tag-manager-app%23migrating-to-gtm-3x)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)