Skip to main content
Published: September 29 2005, 2:17:00 PMUpdated: July 21 2022, 10:54:24 AM

The GetCategoriesCall uses the CategorySiteID to determine which eBay site's categories to return. The site ID in the header is not used for this logic. A code snippet for the Java SDK is shown below:

GetCategoriesCall gcCall = new GetCategoriesCall(apiContext);
gcCall.setCategorySiteID(SiteCodeType.Germany); // SET THE SITE ID HERE
CategoryType[] ebayCategories = gcCall.getCategories();
System.out.println("Category Version: " + gcCall.getReturnedCategoryVersion());
System.out.println("Category Site ID: " + gcCall.getCategorySiteID());

How well did this answer your question?
Answers others found helpful