Alokai

getProductsById

Fetches products by ids.

It receives data from the BigCommerce getProductsById GraphQL API.

Signature

declare function getProductsById(
	context: BigcommerceIntegrationContext,
	params: GetProductsByIdParameters
): Promise<ProductsResponse>;

Parameters

NameRequiredTypeDescription
contextRequiredBigcommerceIntegrationContext
paramsRequiredGetProductsByIdParameters

Returns

Returns a response with the matching products data.

Referenced Types

Examples

Fetching product data.

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

const products = await sdk.bigcommerce.getProductsById({ ids: ['77'] });

On this page