Alokai

getCategory

Fetches a single Category by ID.

It receives data from the getCategory endpoint exposed by the BigCommerce API

Signature

declare function getCategory(
	context: BigcommerceIntegrationContext,
	params?: CategoryParameters
): Promise<CategoryResponse>;

Parameters

NameRequiredTypeDescription
contextRequiredBigcommerceIntegrationContext
paramsOptionalCategoryParameters

Returns

Returns a response with the matching category data.

Referenced Types

Examples

Fetching category that matches the id from the query.

import { sdk } from '~/sdk.config.ts';

const category = await sdk.bigcommerce.getCategory({ categoryId: 1 });

On this page