getProducts
Fetches details of a product from BigCommerce store.
It receives data from the getProducts endpoint exposed by the BigCommerce API
Signature
declare function getProducts(
context: BigcommerceIntegrationContext,
params: GetProductsParameters
): Promise<ProductsResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | GetProductsParameters |
Returns
Returns a response with the matching products data.
Referenced Types
Examples
Fetching product that match the name in the query.
import { sdk } from '~/sdk.config.ts';
const product = await sdk.bigcommerce.getProducts({ name: 'Suitcase' });Fetching product that match the name in the query.
import { sdk } from '~/sdk.config.ts';
const channel = ...
const product = await sdk.bigcommerce.getProducts({ name: 'Suitcase', channel });