How to retrieve path ID for eBay category with developer API?
I would like to retrieve the category path of any given leaf category. Previously, the GetCategoryInfo API call in the Shopping API returned this information, but this API call is now deprecated. I was looking into the trading API's GetCategories API call which returns a CategoryParentID. The documentation claims the API call can return all parent ID's of a category to the root, but it's only returning the direct parent for me.
An example response can be seen below. The leaf category has two ancestors, but GetCategories returns only one:
<?xml version="1.0" encoding="UTF-8"?>
<GetCategoriesResponse xmlns="urn<img alt=":ebay:" class="lia-deferred-image lia-image-emoji" src="https://ebay01.lithium.com/html/@B508B2DD2026E9C06A7FDE122B2F978B/images/emoticons/Ebay.gif" title=":ebay:"/>apis:eBLBaseComponents">
<Timestamp>2024-01-31T22:28:50.073Z</Timestamp>
<Ack>Success</Ack>
<Version>1347</Version>
<Build>E1347_CORE_APICATALOG_19146446_R1</Build>
<CategoryArray>
<Category>
<BestOfferEnabled>true</BestOfferEnabled>
<AutoPayEnabled>true</AutoPayEnabled>
<CategoryID>169291</CategoryID>
<CategoryLevel>3</CategoryLevel>
<CategoryName>Women's Bags & Handbags</CategoryName>
<CategoryParentID>260010</CategoryParentID>
<LeafCategory>true</LeafCategory>
</Category>
</CategoryArray>
<CategoryCount>1</CategoryCount>
<UpdateTime>2023-10-11T09:35:36.000Z</UpdateTime>
<CategoryVersion>130</CategoryVersion>
<ReservePriceAllowed>true</ReservePriceAllowed>
<MinimumReservePrice>0.0</MinimumReservePrice>
</GetCategoriesResponse>
How can I retrieve the entire taxonomy path of a category with eBay's current API?
lev449
Posted 2 years ago·Last reply 2 years ago
2 comments
developer_support@ebay
Hi @lev449
Please note that the GetSuggestedCategories call of Trading API has been deprecated and will be decommissioned on July 1st, 2024. The alternative to this call is the getCategorySuggestions method of the Taxonomy API, which also returns suggested eBay categories based on keywords.
The Taxonomy API methods enable you to assist both buyers and sellers by:
Note: Refer to the Taxonomy API overview page for more information about how the Taxonomy API can be used for both buyers and sellers.
lev449
OP2 years agoHello!
Thank you for the response. How can I retrieve the the entire category path of a leaf category using the GetCategories API call I linked in the original post?
Thanks