Home > @poq/sdk-sfcc > CategoriesClient > getCategoriesByID
When you use the URL template below, the server returns a category identified by its id; by default, the server also returns the first level of subcategories, but you can specify another level by setting the levels parameter. The server only returns online categories.
Signature:
getCategoriesByID(id: string, levels?: number, locale?: string, options?: RequestOptions): Promise<PoqResponse<Category>>;
Parameter | Type | Description |
---|---|---|
id | string | The id of the requested category. |
levels | number | (Optional) |
locale | string | (Optional) |
options | RequestOptions | (Optional) Override http request option. |
Returns:
Promise<PoqResponse<Category>>