Home
Find the answer to your question
Best practices for GetCategories API call
All metadata calls and GetCategories in particular, have a significantly large response size when retrieved in full. Here are some suggestions to optimize the usage and increase the efficiency of your application:
Sample GetCategories XML request to get the hierarchy for a top level category:
<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<CategorySiteID>0</CategorySiteID>
<DetailLevel>ReturnAll</DetailLevel>
<RequesterCredentials>
<eBayAuthToken>*****</eBayAuthToken>
</RequesterCredentials>
<CategoryParent>20081</CategoryParent>
</GetCategoriesRequest>
If you already have items listed with an old category, and if there is a change, where category is mapped to new CategoryID, a quick way to find the mappings is to call GetCategoryMappings.