question

dh0378 avatar image
0 Likes"
dh0378 asked

The specified category ID does not belong to specified category tree.

I got a three-step response to my last question

when i use interface get_item_aspects_for_category ,it return {"errors":[{"errorId":62005,"domain":"API_TAXONOMY","category":"REQUEST","message":"The specified category ID does not belong to specified category tree."}]}

You can use the GetItemAspectsForCategory a list of aspects that are appropriate or necessary for accurately describing items in the specified category.

REF: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getItemAspectsForCategory

Please follow the procedure mentioned below before making the GetItemAspectsForCategory call:

1. Firstly, you need to call GetDefaultCategoryTreeId to retrieve a reference to the default category tree associated with the specified eBay marketplace ID.

REF: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getDefaultCategoryTreeId

2. After getting the category_tree_id make a GetCategoryTree call to retrieve the complete category tree that is identified by the category_tree_id parameter.
REF: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategoryTree

3. Find the category with leafCategoryTreeNode as true. This type of category is called leaf category and you can use this type of CategoryIDs in your further requests. To learn more about the category tree structure, please take an overview of the Taxonomy API by going through the link given below:


REF: https://developer.ebay.com/api-docs/commerce/taxonomy/static/overview.html

Best Regards ,
eBay Developer Support

But I did follow the steps above.

i used the step 1 for get_default_category_tree_id?marketplace_id=EBAY_US and got category_tree_id =0

Then I used step 2 to get the complete category tree.

finally i used step 3 ,in categoryId=1249 childCategoryTreeNodes, get_item_aspects_for_category?category_id=38583 can return normally but category_id=187 return the title err

I look forward to hearing from someone


Thanks!!

ebay error
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

There is no category_id 187. What are expecting it to do?

0 Likes 0 ·

1 Answer

· Write an Answer
sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @dh0378,

categoryId 1249 is categoryTreeNodeLevel "1" which. categoryTreeNodelevel shows the level of a category in the hierarchy of its category tree. You can not get the item aspects for a category which has categoryTreeNodeLevel as 1.

Ref: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategoryTree#response.rootCategoryNode.categoryTreeNodeLevel

Please make GetItemAspectsForCategory call for for any other categoryID which does not has the categoryTreeNodeLevel as 1.

Best regards ,
eBay Developer Support

· 2
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you for replying, but I said category = 38583 is a normal return, but category = 187 is an error

0 Likes 0 ·

It is an error because there's no such category. What category do you think it is?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.