{"section":"known-issues","requestedLocale":"en","requestedSlug":"catalog-filter-api-facets-exhibits-unexpected-behavior-when-fields-of-different-specifications-have-the-same-name","locale":"en","slug":"catalog-filter-api-facets-exhibits-unexpected-behavior-when-fields-of-different-specifications-have-the-same-name","path":"docs/en/known-issues/Marketing & Merchandising/catalog-filter-api-facets-exhibits-unexpected-behavior-when-fields-of-different-specifications-have-the-same-name.md","branch":"main","content":"## Summary\n\nWhen executing the filter API (Facet), an error 500 message (\"An item with the same key has already been added\") is displayed if the result contains specification fields (of product or SKU) with the same name.\n\nAPI EndPoint: /api/catalog_system/pub/facets/search/\\{category\\}?map=c\n\n## Simulation\n\nTo simulate this scenario:\n\n1. Create a field named \"size\" for example in any subcategory of the category you wish to test. Define it as a filter.\n2. Create a field having the same name (\"size\", in our example) in another subcategory of the category you wish to test. Define it as a filter as well.\n3. Input values in these fields;\n4. Create a product in each subcategory and fill out the defined field (\"size\" in our example)\n5. Wait for the product indexation to finish (about 5 minutes)\n6. Execute the endpoint /api/catalog_system/pub/facets/search/\\{category\\}?map=c\n\n## Workaround\n\nTo prevent this behavior, avoid creating fields having the same name in parallel categories (subcategories of the same parent category). \n\nIf the API is used for rendering a side menu (filter), it can replaced by the native searchNavigator control. [Click here to find out more](http://help.vtex.com/en/tutorial/--tutorials_550)"}