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:
- type * - (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.
- callback * - The callback to get the resources categories.
Note: Fields marked * are mandatory.
Error Code
Code | Message |
---|---|
1017 | Resource limit reached for the current plan |
1025 | Invalid department ID |
6102/1015 | Invalid language code |
17001 | Invalid category ID |
18013 | The provided language is not enabled. From your SalesIQ dashboard, navigate to Resources > Manage languages and enable this language. |
500 | Mobilisten SDK not initialized |
600 | No network connection |
605 | Mobilisten SDK is disabled |
Syntax
CopiedZohoSalesIQ.KnowledgeBase.getCategories(
type: string,
departmentId: string | null,
parentCategoryId: string | null,
callback: (error: CallbackError, categories: object[]) => void
)
Example
CopiedZohoSalesIQ.KnowledgeBase.getCategories(ZohoSalesIQ.Resource.ARTICLES, departmentId: "department_id", parentCategoryId: "parent_category_id", (error, categories) => {
});