getCategoryTree
Fetches a category tree.
It receives data from the getCategoryTree endpoint exposed by the BigCommerce API
Signature
declare function getCategoryTree(
context: BigcommerceIntegrationContext,
params?: GetCategoryTreeParameters
): Promise<GetCategoryTreeResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Optional | GetCategoryTreeParameters |
Returns
Returns a response with the category tree data.
Referenced Types
Examples
Fetching category that matches the id from the query.
import { sdk } from '~/sdk.config.ts';
const categoryTree = await sdk.bigcommerce.getCategoryTree();Fetching category that matches the id from the query.
import { sdk } from '~/sdk.config.ts';
const channel = 123456;
const categoryTree = await sdk.bigcommerce.getCategoryTree({ channel });