Skip to product menu
Skip to main content

getCategories()

The ZohoSalesIQ.KnowledgeBase.getCategories API allows to get a list of resource's (article) categories based on the below parameters. To get a specific resource list, use the below parameters as filters.

Parameters:

  • resourceType * - (Articles) The type of the resource.
  • departmentId (Optional) - Department ID to fetch resource categories associated with it.
  • parentCategoryId (Optional) - The category Id to get the sub-categories.
  • listener * - The callback to get the resources categories.

Note: Fields marked * are mandatory.

Error Code

CodeMessage
1017Resource limit reached for the current plan
1025Invalid department ID
6102/1015Invalid language code
17001Invalid category ID
18013The provided language is not enabled. From your SalesIQ dashboard, navigate to Resources > Manage languages and enable this language.
500Mobilisten SDK not initialized
600No network connection
605Mobilisten SDK is disabled

 

Syntax

CopiedZohoSalesIQ.KnowledgeBase.getCategories(ZohoSalesIQ.ResourceType.Articles,"department_id", "parent_category_id", new ResourceCategoryListener() {
    @Override
    public void onSuccess(@NonNull List<ResourceCategory> resourceCategories) {

    }

    @Override
    public void onFailure(int code, @Nullable String message) {
    
    }
});
CopiedZohoSalesIQ.KnowledgeBase.getCategories(ZohoSalesIQ.ResourceType.Articles, "department_id", "parent_category_id", object : ResourceCategoryListener {

      override fun onSuccess(resourcesCategories: List<ResourceCategory>) {
                
      }

      override fun onFailure(code: Int, message: String?) {
                
      }
})