The following sample code retrieves the list of category records for the given category IDs, rebuilds the categories, and updates the data accordingly.
public void rebuildCategories(List<Id> categoryIds)
{
Apttus_CPQApi.CPQWebService.rebuildCategoryHierachies(categoryIds);
}