{"section":"known-issues","requestedLocale":"en","requestedSlug":"creating-subcategory-via-category-path-with-the-same-name-as-another-subcategory-fails","locale":"en","slug":"creating-subcategory-via-category-path-with-the-same-name-as-another-subcategory-fails","path":"docs/en/known-issues/Catalog/creating-subcategory-via-category-path-with-the-same-name-as-another-subcategory-fails.md","branch":"main","content":"## Summary\n\n\nCurrently, it is possible to create new categories and/or subcategories by informing their names via the JSON property \"CategoryPath\" in the insert product API: https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/product\n\nHowever, when the informed subcategory has the same name as another subcategory, the product is created in the former and the latter is not generated.\n\nThis doesn't happen for categories.\n\n\n##\n\n## Simulation\n\n\nUsing the mentioned API, create a product informing, in the category path, a subcategory that has the same name as another subcategory but is not yet created and should be created elsewhere in the category tree.\n\nAs an example, check the tree below:\n\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Catalog/creating-subcategory-via-category-path-with-the-same-name-as-another-subcategory-fails_1.png)\n\nThis would mean informing in the path \"Department/Category2/Subcategory1\".\n\nThe product will be created in the path \"Department/Category/Subcategory1\" instead and the new subcategory will not be created.\n\n\n##\n\n## Workaround\n\n\nCreate the subcategory by other means instead, such as the PUT category API: https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/category and then insert the product to this category informing its path or ID."}