Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Creating subcategory via category path, with the same name as another subcategory, fails
Creating subcategory via category path, with the same name as another subcategory, fails
ID: 1087069
Backlog
Published on 8/26/2024
Last update on 8/26/2024

Summary

Currently, 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

However, when the informed subcategory has the same name as another subcategory, the product is created in the former and the latter is not generated.

This doesn't happen for categories.

Simulation

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

As an example, check the tree below:

{"base64":"  ","img":{"width":180,"height":121,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":4899,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/known-issues/Catalog/creating-subcategory-via-category-path-with-the-same-name-as-another-subcategory-fails_1.png"}}

This would mean informing in the path "Department/Category2/Subcategory1".

The product will be created in the path "Department/Category/Subcategory1" instead and the new subcategory will not be created.

Workaround

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

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback