Developers Program

GetCategoriesCall is always returning items from Site US

Published: September 29 2005, 2:17:00 PMยทUpdated: July 21 2022, 10:54:24 AM

Products

Answer

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?