Alokai

getProductsByCategory

Fetches products by the category id.

It receives data from the BigCommerce getProductsByCategory GraphQL API.

Signature

declare function getProductsByCategory(
	context: BigcommerceIntegrationContext,
	params: GetProductsByCategoryParameters
): Promise<ProductsResponse>;

Parameters

NameRequiredTypeDescription
contextRequiredBigcommerceIntegrationContext
paramsRequiredGetProductsByCategoryParameters

Returns

Returns a response with the matching products data.

Referenced Types

Examples

Fetching products data by category id.

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

const products = await sdk.bigcommerce.getProductsByCategory({ entityId: 77 });

On this page