[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 external search provider specification 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/external-search-provider-specification/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/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/external-search-provider-specification/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/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/external-search-provider-specification/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/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/external-search-provider-specification/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/customer-credit-integration-guide)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/search-integration-guide)

[Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-overview)

[Specification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification)

[Recipe](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-recipe)

[Reference Implementations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-reference)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/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/external-search-provider-specification/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/customer-credit-integration-guide)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/search-integration-guide)

[Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-overview)

[Specification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification)

[Recipe](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-recipe)

[Reference Implementations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-reference)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/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/external-search-provider-specification/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides)

Integration Guides

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/search-integration-guide)

[Specification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification)

Specification

## GraphQL Queries to Implement

To implement the protocol you need to implement resolvers for every GraphQL query on the `vtex.search-graphql` [schema](https://read.calvincode.net/reader?url=https://github.com/vtex-apps/search-graphql). As explained in the Limitations section below, only a part of these queries are actually interesting for an external search provider to implement:

* `productSearch`: the actual search engine query
* `facets`: facets to be used as filters
* `banners`: banners to retrieve and show in specific sections of the web page
* `correction`: Corrections for possible typos that a user makes when searching for a product
* `searchSuggestions`: Suggestions of terms based on the search term that the user has made.
* `topSearches`: top searches that is shown when a user puts the cursor over the search bar
* `autocompleteSearchSuggestions`: suggestions of products and terms to be shown in the search bar.
* `productSuggestions`: suggestions of products to be shown in the search result page
* `searchMetadata`: metadata for the specific search result page

## GraphQL Queries Not needed to be Reimplemented

The following queries are not needed to reimplement using the external search provider, as they don't add anything potentially beneficial to the UX if you use an external search provider. On the other hand, these queries are still needed for the store to work properly, so make sure to leverage the VTEX Catalog API's to implement them.

* `product`
* `products`
* `productsByIdentifier`
* `searchURLsCount`

## Limitations

* It is only possible to have one search-resolver service per workspace. If more than one is installed, the workspace will break. This is a known issue that we plan to solve in the near future. To start the development of a new search provider, create a workspace, uninstall the old one (e.g. `vtex.search-resolver`), and then you can start developing your new `search-resolver`.
* The 4 queries listed above that are not needed to be reimplemented are still indeed needed to be implemented. So the best path at this moment is to copy the code for these 4 queries from the reference implementations section.

## Indexing

* You can also use the same VTEX IO app responsible for being a search provider to also set up a webhook and receive notifications whenever a change in the catalog occurs. This VTEX IO app can, then, send the catalog changes to the search provider.

![{"base64":"  ","img":{"width":2188,"height":772,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":93732,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/docs/guides/Integration-Guides/search-integration-guide/cc299d1-catalog_40.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/docs/guides/Integration-Guides/search-integration-guide/cc299d1-catalog_40.png)

To receive catalog changes, refer to this [Receiving Catalog Changes on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/how-to-receive-catalog-changes-on-vtex-io).

## Onboarding

* When a user installs your search-resolver app, you probably will need an admin panel to set up the app. You can find a working example on `https://github.com/vtex-apps/admin-example`. This admin app can show the indexing progress and also notify the search provider service that a new customer needs to be onboarded.
* The onboarding flow usually is: VTEX client installs app in a different workspace than master → Enters the admin panel to set up the app → app notifies indexing system that a new account is to be indexed → index is 100% completed → VTEX client can promote/install the search provider in master.

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

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

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

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/Integration-Guides/search-integration-guide/external-search-provider-specification.md)

[Overview« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification//docs/guides/external-search-provider-overview)[RecipeNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification//docs/guides/external-search-provider-recipe)

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

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

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

ON THIS PAGE

[GraphQL Queries to Implement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23graphql-queries-to-implement)

[GraphQL Queries Not needed to be Reimplemented](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23graphql-queries-not-needed-to-be-reimplemented)

[Limitations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23limitations)

[Indexing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23indexing)

[Onboarding](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23onboarding)

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/Integration-Guides/search-integration-guide/external-search-provider-specification.md)

Copy page

On this page

ON THIS PAGE

[GraphQL Queries to Implement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23graphql-queries-to-implement)

[GraphQL Queries Not needed to be Reimplemented](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23graphql-queries-not-needed-to-be-reimplemented)

[Limitations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23limitations)

[Indexing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23indexing)

[Onboarding](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-search-provider-specification/docs/guides/external-search-provider-specification%23onboarding)

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] How do I use the VTEX rewriter 1.63.0 rewriter graphql api app? Provide documentation and configuration details.

[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/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/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/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/functional-apps)

[AB Tester](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtexarg.abtester)

[Abandoned Cart Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.abandoned-cart-service)

[Badges](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.badges)

[Broadcaster](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.broadcaster)

[Catalog Images](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.catalog-images)

[Checkout UI Custom](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.checkout-ui-custom)

[Checkout UI Settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.checkout-ui-settings)

[Messages](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.messages)

[Product Context](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.product-context)

[Pickup point selector](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtexbr.pickup-selector)

[Rewriter](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter)

[Rewriter GraphQL API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter/rewriter-graphql-api)

[Responsive Values](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.responsive-values)

[Search GraphQL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.search-graphql)

[Session Client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.session-client)

[Store Icons](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.store-icons)

[Store Sitemap](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.store-sitemap)

[VTEX Telemarketing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.telemarketing)

[Assembly Options](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/assembly-options-app)

[Affiliates Program](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/affiliates-program-app)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/vtex-io-deprecated-apps)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/functional-apps)

[AB Tester](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtexarg.abtester)

[Abandoned Cart Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.abandoned-cart-service)

[Badges](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.badges)

[Broadcaster](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.broadcaster)

[Catalog Images](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.catalog-images)

[Checkout UI Custom](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.checkout-ui-custom)

[Checkout UI Settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.checkout-ui-settings)

[Messages](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.messages)

[Product Context](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.product-context)

[Pickup point selector](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtexbr.pickup-selector)

[Rewriter](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter)

[Rewriter GraphQL API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter/rewriter-graphql-api)

[Responsive Values](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.responsive-values)

[Search GraphQL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.search-graphql)

[Session Client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.session-client)

[Store Icons](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.store-icons)

[Store Sitemap](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.store-sitemap)

[VTEX Telemarketing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.telemarketing)

[Assembly Options](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/assembly-options-app)

[Affiliates Program](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/affiliates-program-app)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/vtex-io-deprecated-apps)

---

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/vtex-io-apps)

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/guides/functional-apps)

[Rewriter](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter)

Rewriter GraphQL API

[vtex.rewriter](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter)

Version: 1.63.0

Latest version: 1.68.0

> This page is about version **1.63.0** of the app, which is not the most recent version. The latest stable version is **1.68.0**.

This article serves as a comprehensive guide to the GraphQL API provided by the [Rewriter app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter). This API allows managing internal URLs and URL redirects.

Routes stored in the Rewriter commonly have complex paths, since they communicate with other systems and databases. To improve client-side usage and SEO rankings, the Rewriter app has, in the definition of the routes, the standard paths along with canonical (shorter) paths. For instance, the standard path to a product is `/_v/segment/routing/vtex.store@2.x/product/:id/:slug/p`, while the canonical path to a product is `/:slug/p`.

The Rewriter app is responsible for three main types of routes: **product**, **search**, and **navigation** routes.

The first two are first-class entities in Rewriter, meaning Rewriter identifies these routes and directly forwards them to the rendering pipeline.

Navigation routes, in turn, are client-side defined routes related to custom paths and VTEX IO pre-defined templates, such as department, brand, and category routes. These routes can have a canonical path and a search query string.

In Rewriter, navigation routes are identified by the internal type, and routes used to redirect a route from one path to another are identified by the redirect type.

The table below summarizes the classification of routes used in the API.

| Type of route | Description                                                                                |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Internal      | Identifies navigation routes. Its standard path can have segments specifying the communication with other systems such as databases or apps, possibly making them long. It can be associated with a canonical path, omitting some segments, for improved client-side usage and SEO ranking. |
| Redirect      | Navigation route that redirects one path to another. There are various reasons to use a redirect including URL changes, content removal, SEO and navigation improvements, and others.                                                                                |

Rewriter includes functionalities to:

* Create an internal route.
* Create a canonical path related to an internal route.
* Create a redirect route.
* Delete an internal route.
* Delete a canonical path related to an internal route.
* Delete a redirect route.
* Create translated URLs for cross-border stores.

In the following sections are the definitions of endpoints and parameter descriptions of the Rewriter GraphQL API.

## Schema overview

### Query

 Query  version: String [ redirect: ](#redirect) [ QueryRedirect!](#queryredirect) [internal:](#internal) [QueryInternal!](#queryinternal)  QueryRedirect  get(path:String!, locator:[RouteLocator](#routelocator)): [Redirect](#redirect)  listRedirects(limit:Int, next:String): [ListRedirectsResponse!](#listredirectsresponse)  Query: redirect  QueryInternal  get(path:String!, locator:[RouteLocator](#routelocator)): [Internal](#internal)  listInternals(limit:Int, next:String): [ListInternalsResponse!](#listinternalsresponse)  routes(locator:[EntityLocator](#entitylocator)): [\[RoutesByBinding!\]](#routesbybinding)  Query: internal  Redirect  from: String!  to: String!  endDate: String  type: [RedirectTypes!](#redirecttypes)  binding: String!  origin: String  QueryRedirect: get  ListRedirectsResponse  routes: [\[Redirect!\]](#redirect)  next: String  QueryRedirect: listRedirects  Internal  from: String!  declarer: String!  type: String!  id: String!  query: JSON  binding: String!  endDate: String  imagePath: String  imageTitle: String  routesVersion: Float  resolveAs: String  origin: String  disableSitemapEntry: Boolean  QueryInternal: get  ListInternalsResponse  routes: [\[Internal!\]](#internal)  next: String  QueryInternal: listInternals  RoutesByBinding  binding: String!  route: String!  QueryInternal: routes  ListRedirectsResponse: routes  ListInternalsResponse: routes

| Field        | Type                             | Description                                                                                |
| ------------ | -------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **redirect** | [QueryRedirect](#queryredirect)! | Provides _redirect_ routes data.Redirect routes are used to redirect a route from one path to another. |
| **internal** | [QueryInternal](#queryinternal)! | Provides _internal_ routes data.Internal routes are navigation routes.                                 |

### Mutation

Mutation  Mutation [redirect](#redirect) [ MutateRedirect!](#mutateredirect) [internal:](#internal) [ MutateInternal!](#mutateinternal) MutateRedirect  MutateRedirect  save(route: [RedirectInput](#redirectinput)!): [Redirect](#redirect)  saveMany(routes: \[[RedirectInput](#redirectinput)!\]!): Boolean!  delete(path: String! locator: [RouteLocator](#routelocator)): [Redirect](#redirect) deleteMany(paths: \[String!\]! locators: \[[RouteLocator](#routelocator)!\]): Boolean! Mutation:redirectport->MutateRedirect Mutation: redirect MutateInternal  MutateInternal save(route: [InternalInput](#internalinput)!): [Internal](#internal) saveMany(routes: \[[InternalInput](#internalinput)!\]!): Boolean! delete(path: String! locator: [RouteLocator](#routelocator)): [Internal](#internal) deleteMany(paths: \[String!\]! locators: \[[RouteLocator](#routelocator)!\]): Boolean! Mutation:internalport->MutateInternal Mutation: internal  Redirect  from: String!  to: String!  endDate: String  type: [RedirectTypes!](#redirecttypes)  binding: String!  origin: String MutateRedirect:deleteport-Redirect MutateRedirect: delete  Internal  from: String!  declarer: String!  type: String!  id: String!  query: JSON  binding: String!  endDate: String  imagePath: String  imageTitle: String  routesVersion: Float  resolveAs: String  origin: String  disableSitemapEntry: Boolean MutateInternal:saveport-Internal MutateInternal: save MutateInternal:deleteport-Internal MutateInternal: delete MutateRedirect:saveport-Redirect MutateRedirect: save

| Field        | Type                               | Description                                                                                |
| ------------ | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **redirect** | [MutateRedirect](#mutateredirect)! | Updates or deletes _redirect_ routes data according to the provided arguments.Redirect routes are used to redirect a route from one path to another. |
| **internal** | [MutateInternal](#mutateinternal)! | Updates or deletes _internal_ routes data according to the provided arguments.Internal routes are navigation routes.                                 |

## Schema description

> Arguments must be provided by the user. The exclamation mark `!` indicates that a type cannot be nullable.

### QueryRedirect

| Field             | (argument)                                       | Type                                                                                | Description |
| ----------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| **get**           | [Redirect](#redirect)                            | Returns information regarding a specific redirect route, given its related _path_ and _locator_.                                                                                |             |
| path              | **String!**                                      | The path of the desired route to fetch data.                                                                                |             |
| locator           | [RouteLocator](#routelocator)                    | The _RouteLocator_ object, containing information about the store locale and route origin.                                                                                |             |
| **listRedirects** | [ListRedirectsResponse](#listredirectsresponse)! | Lists all redirect routes.                                                                                |             |
| limit             | Int                                              | The number of _ListRedirectsResponse_ objects to be displayed at once.                                                                                |             |
| next              | String                                           | The argument used to fetch more internal routes from _ListRedirectsResponse_.It must be empty in the first query and, in the following, filled in with the string previously obtained from the _ListRedirectsResponse_ object. |             |

[Query](#query) 🔼

### QueryInternal

| Field             | (argument)                                       | Type                                                                                | Description |
| ----------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| **get**           | [Internal](#internal)                            | Returns information regarding a specific internal route, given its related _path_ and _locator_                                                                                |             |
| path              | String!                                          | The path of the desired route to fetch data.                                                                                |             |
| locator           | [RouteLocator](#routelocator)                    | The _RouteLocator_ object, containing information about the store locale and route origin.                                                                                |             |
| **listInternals** | [ListInternalsResponse](#listinternalsresponse)! | Lists all internal routes.                                                                                |             |
| limit             | Int                                              | The number of _ListInternalsResponse_ objects to be displayed at once.                                                                                |             |
| next              | String                                           | The argument used to fetch more internal routes from _ListInternalsResponse_.It must be empty in the first query and, in the following, filled in with the string previously obtained from the _ListInternalsResponse_ object. |             |
| **routes**        | \[[RoutesByBinding](#routesbybinding)!\]         | Lists all internal routes of a specific type (e.g. deparment routes, category routes, etc.) and its related _binding_, which is an identifier for each store locale.                                                           |             |
| locator           | [EntityLocator](#entitylocator)                  | The _EntityLocator_ object, containing information about the entity type of the routes to be listed.                                                                                |             |

[Query](#query) 🔼

### MutateRedirect

| Field          | (argument)                            | Type                                                                                | Description |
| -------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------ | ----------- |
| **save**       | [Redirect](#redirect)                 | Creates or updates a redirect route according to the provided arguments.                               |             |
| route          | [RedirectInput](#redirectinput)!      | The data regarding the redirect route to be created or updated.                                        |             |
| **saveMany**   | Boolean!                              | Creates or updates many redirect routes according to the provided arguments.                           |             |
| routes         | \[[RedirectInput](#redirectinput)!\]! | The data regarding the redirect routes to be created or updated.                                       |             |
| **delete**     | [Redirect](#redirect)                 | Deletes a redirect route according to the provided arguments.                                          |             |
| path           | String!                               | The path of the route to be deleted.                                                                   |             |
| locator        | [RouteLocator](#routelocator)         | The _EntityLocator_ object, containing information about the entity type of the route to be deleted.   |             |
| **deleteMany** | Boolean!                              | Deletes many redirect route according to the provided arguments.                                       |             |
| paths          | \[String!\]!                          | The paths of the routes to be deleted.                                                                 |             |
| locators       | \[[RouteLocator](#routelocator)!\]    | The _EntityLocator_ objects, containing information about the entity type of the routes to be deleted. |             |

[Mutation](#mutation) 🔼

### MutateInternal

| Field          | (argument)                            | Type                                                                                | Description |
| -------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------ | ----------- |
| **save**       | [Internal](#internal)                 | Creates or updates an internal route according to the provided arguments.                              |             |
| route          | [InternalInput](#internalinput)!      | The data regarding the internal route to be created or updated.                                        |             |
| **saveMany**   | Boolean!                              | Creates or updates many internal routes according to the provided arguments.                           |             |
| routes         | \[[InternalInput](#internalinput)!\]! | The data regarding the internal routes to be created or updated.                                       |             |
| **delete**     | [Internal](#internal)                 | Deletes an internal route according to the provided arguments.                                         |             |
| path           | String!                               | The path of the route to be deleted.                                                                   |             |
| locator        | [RouteLocator](#routelocator)         | The _EntityLocator_ object, containing information about the entity type of the route to be deleted.   |             |
| **deleteMany** | Boolean!                              | Deletes many internal routes according to the provided arguments.                                      |             |
| paths          | \[String!\]!                          | The paths of the routes to be deleted.                                                                 |             |
| locators       | \[[RouteLocator](#routelocator)!\]    | The _EntityLocator_ objects, containing information about the entity type of the routes to be deleted. |             |

[Mutation](#mutation) 🔼

### Internal

| Field                   | Type    | Description                                                                                |
| ----------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **from**                | String! | The route path.                                                                                |
| **declarer**            | String! | The app that originally defined the route in a routes.json file. For VTEX IO pre-defined routes, the declarer value is [vtex.store@2.x](mailto:vtex.store@2.x).                                                                                |
| **type**                | String! | The route entity type defined in the declarer app, which can be: department, category, subcategory, brand, etc.                                                                                |
| **id**                  | String! | The entity type id. For example, a deparment id.                                                                                |
| **query**               | JSON    | The query string parameters of a route.                                                                                |
| **binding**             | String! | The id of the _binding_ which the route is available._Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |
| **endDate**             | String  | The date a route stops being valid._Keep in mind: The endDate value for permanent routes is null._                                                                                |
| **imagePath**           | String  |                                                                                |
| **imageTitle**          | String  |                                                                                |
| **routesVersion**       | Float   | The current routes version._Keep in mind: If the routesVersion value is null or different from the current version, the route is not currently available in the store._                                                                                |
| **resolveAs**           | String  | Alias paths of a route, meaning that the route will resolve the paths defined in the resolveAs field _Keep in mind: The resolveAs parameter must always be defined in the catalog's default language._                                                         |
| **origin**              | String  | A string that defines the origin of the route, for example: user-canonical                                                                                |
| **disableSitemapEntry** | Boolean | The boolean value that indicates if a route is included (False) or not (True) in the store's sitemap.                                                                                |

[QueryInternal](#queryinternal) 🔼

[MutateInternal](#mutateinternal) 🔼

[ListInternalsResponse](#listinternalsresponse) 🔼

### ListInternalsResponse

| Field      | Type                       | Description                                                                                |
| ---------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **routes** | \[[Internal](#internal)!\] | Returns the demanded information from the _Internal_ object for each route.                                                                                |
| **next**   | String                     | Returns a string to be used as the _next_ argument of the succeeding _listInternals_ query to fetch more data.When _next_ returns _null_, all data have already been fetched. |

[QueryInternal](#queryinternal) 🔼

### RoutesByBinding

| Field       | Type    | Description                                                                                |
| ----------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **binding** | String! | The id of the _binding_ which the route is available. _Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |
| **route**   | String! | Returns the route path.                                                                                |

[QueryInternal](#queryinternal) 🔼

### Redirect

| Field       | Type                             | Description                                                                                |
| ----------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **from**    | String!                          | The original route path.                                                                                |
| **to**      | String!                          | The route redirect path.                                                                                |
| **endDate** | String                           | The date a redirect route stops being valid. _Keep in mind: The endDate value for permanent routes is null._                                                                                |
| **type**    | [RedirectTypes](#redirecttypes)! | The route type: temporary or permanent.                                                                                |
| **binding** | String!                          | The id of the _binding_ which the route is available. _Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |
| **origin**  | String                           | A string that defines the origin of the route, for example: user-canonical                                                                                |

[QueryRedirect](#queryredirect) 🔼

[MutateRedirect](#mutateredirect) 🔼

### ListRedirectsResponse

| Field      | Type                       | Description                                                                                |
| ---------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **routes** | \[[Redirect](#redirect)!\] | Returns the demanded information from the _Redirect_ object for each route.                                                                                |
| **next**   | String                     | Returns a string to be used as the _next_ argument of the succeeding _listInternals_ query to fetch more data.When _next_ returns _null_, all data have already been fetched. |

[QueryRedirect](#queryredirect) 🔼

### EntityLocator

| Field    | Type    | Description                                                                         |
| -------- | ------- | ----------------------------------------------------------------------------------- |
| **id**   | String! | The entity type id. For example, a deparment id.                                    |
| **type** | String! | The route entity type, which can be: department, category, subcategory, brand , etc |

[QueryInternal](#queryinternal) 🔼

### InternalInput

| Field                   | Type    | Description                                                                                |
| ----------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **from**                | String! | The route path.                                                                                |
| **declarer**            | String! | The app that originally defined the route in a routes.json file. For VTEX IO pre-defined routes, the declarer value is [vtex.store@2.x](mailto:vtex.store@2.x).                                                                                |
| **type**                | String! | The route entity type, which can be: department, category, subcategory, brand , etc                                                                                |
| **id**                  | String! | The entity type id. For example, a deparment id.                                                                                |
| **query**               | JSON    | The query string parameters of a route.                                                                                |
| **binding**             | String  | The id of the _binding_ which the route is available._Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |
| **endDate**             | String  | The date a route stops being valid._Keep in mind: The endDate value for permanent routes is null._                                                                                |
| **imagePath**           | String  |                                                                                |
| **imageTitle**          | String  |                                                                                |
| **resolveAs**           | String  | Alias paths of a route, meaning that the route will resolve the paths defined in the resolveAs field. _Keep in mind: The resolveAs parameter must always be defined in the catalog's default language._                                                        |
| **origin**              | String  | A string that defines the origin of the route, for example: user-canonical                                                                                |
| **disableSitemapEntry** | Boolean | The boolean value that indicates if a route is included (False) or not (True) in the store's sitemap.                                                                                |

[MutateInternal](#mutateinternal) 🔼

### RedirectInput

| Field       | Type                             | Description                                                                                |
| ----------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **from**    | String!                          | The original route path.                                                                                |
| **to**      | String!                          | The route redirect path.                                                                                |
| **endDate** | String                           | The date a route stops being valid._Keep in mind: The endDate value for permanent routes is null._                                                                                |
| **type**    | [RedirectTypes](#redirecttypes)! | The route type: temporary or permanent.                                                                                |
| **binding** | String                           | The id of the _binding_ which the route is available._Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |
| **origin**  | String                           | A string that defines the origin of the route, for example: user-canonical                                                                                |

[MutateRedirect](#mutateredirect) 🔼

### RouteLocator

| Field       | Type    | Description                                                                                |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **from**    | String! | The original route path.                                                                                |
| **binding** | String! | The id of the _binding_ which the route is available._Keep in mind: Every store has a binding id related to its store locale. Hence, cross-border stores always have more than one binding, while accounts with a single storefront have only one binding id._ |

[QueryRedirect](#queryredirect) 🔼

[QueryInternal](#queryinternal) 🔼

[MutateRedirect](#mutateredirect) 🔼

[MutateInternal](#mutateinternal) 🔼

### RedirectTypes

| Value         | |  **PERMANENT** |
| ------------- | ---------------- |
| **TEMPORARY** |                  |

[Redirect](#redirect) 🔼

[RedirectInput](#redirectinput) 🔼

[Rewriter« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter)[Responsive ValuesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.responsive-values)

See also

[Vtex.rewriterVTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter)[VTEX App StoreVTEX IO Apps](https://read.calvincode.net/reader?url=https://apps.vtex.com/)

ON THIS PAGE

[Schema overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23schema-overview)

[Query](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23query)[Mutation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23mutation)

[Schema description](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23schema-description)

[QueryRedirect](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23queryredirect)[QueryInternal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23queryinternal)[MutateRedirect](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23mutateredirect)[MutateInternal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23mutateinternal)[Internal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23internal)[ListInternalsResponse](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23listinternalsresponse)[RoutesByBinding](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23routesbybinding)[Redirect](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23redirect)[ListRedirectsResponse](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23listredirectsresponse)[EntityLocator](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23entitylocator)[InternalInput](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23internalinput)[RedirectInput](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23redirectinput)[RouteLocator](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23routelocator)[RedirectTypes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api/docs/apps/vtex.rewriter@1.63.0/rewriter-graphql-api%23redirecttypes)

Was this helpful?

[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 setting up an auto increment field in master data v2 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/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/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/setting-up-an-auto-increment-field-in-master-data-v2/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/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/setting-up-an-auto-increment-field-in-master-data-v2/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/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/setting-up-an-auto-increment-field-in-master-data-v2/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data)

[Understanding Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/understanding-master-data)

[Master Data best practices](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-best-practices)

[Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v2)

Schemas

Triggers

[Master Data v2 document saving flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v2-document-saving-flow)

[Creating relationships between data entities using Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/creating-relationships-between-data-entities-using-master-data-v2)

[Using dynamic expressions on Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/using-dynamic-expressions-on-master-data-v2)

[Searching by geocoordinates in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/searching-by-geocoordinates-in-master-data-v2)

[Setting up alternate keys in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-alternate-keys-in-master-data-v2)

[Setting up an auto increment field in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2)

[Master Data v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v1)

---

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/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data)

[Understanding Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/understanding-master-data)

[Master Data best practices](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-best-practices)

[Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v2)

Schemas

Triggers

[Master Data v2 document saving flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v2-document-saving-flow)

[Creating relationships between data entities using Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/creating-relationships-between-data-entities-using-master-data-v2)

[Using dynamic expressions on Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/using-dynamic-expressions-on-master-data-v2)

[Searching by geocoordinates in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/searching-by-geocoordinates-in-master-data-v2)

[Setting up alternate keys in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-alternate-keys-in-master-data-v2)

[Setting up an auto increment field in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2)

[Master Data v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v1)

---

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/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides)

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data)

[Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/master-data-v2)

[Setting up an auto increment field in Master Data v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2)

Setting up an auto increment field in Master Data v2

**Auto increment** is a Master Data feature that automatically creates unique and sequential values to `integer` type fields when new documents are created.

> The starting value of auto increment fields is always `1`. This value can not be changed.

## Set up

Auto increment fields can be set up in data entities' [JSON schemas](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/working-with-json-schemas-in-master-data-v2).

Create an `integer` field and add its name to the `v-auto-increment` property, like in the example below:

`1

{

2

 "properties": {

3

 "valueAsAutoIncrement": {

4

 "type": "integer"

5

 }

6

 },

7

 "v-auto-increment": [

8

 "valueAsAutoIncrement"

9

 ]

10

}

`

> \- The auto-increment field cannot be `required`.

* The field's type has to be `integer`.

## Usage

When [saving new documents](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-rest-api/reference/createnewdocument) you must identify the corresponding JSON Schema with the query parameter `_schema`. See an example of this:

`1

POST

2

https://{accountName}.{environment}.com.br/api/dataentities/{dataEntityName}/documents?_schema={schemaName}

`

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

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/Master-Data/master-data-v2/setting-up-an-auto-increment-field-in-master-data-v2.md)

[Setting up alternate keys in Master Data v2« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2//docs/guides/setting-up-alternate-keys-in-master-data-v2)[Master Data v1Next »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2//docs/guides/master-data-v1)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

ON THIS PAGE

[Set up](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2%23set-up)

[Usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2%23usage)

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/Master-Data/master-data-v2/setting-up-an-auto-increment-field-in-master-data-v2.md)

Copy page

On this page

ON THIS PAGE

[Set up](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2%23set-up)

[Usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2/docs/guides/setting-up-an-auto-increment-field-in-master-data-v2%23usage)

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=)