Skip to main content
Published: September 29 2005, 2:17:00 PMUpdated: November 28 2020, 1:31:16 PM

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