Home > @vsf-enterprise/bigcommerce-api > Endpoints > getProductById

# Endpoints.getProductById() method

Returns a Product by Id

By default, the product's options, modifiers and custom fields are not returned. See params argument object to see how it's added.

Only up to 250 product images are returned (this is less than the Bigcommerce total limit of 1000 images on a single product). If the thumbnail/default image is set, it's guaranteed to be the first in the returned images array and have is_thumbnail: true.

Signature:

getProductById(context: BigcommerceIntegrationContext, params: GetProductByIdParameters): Promise<ProductResponse>;

# Parameters

Parameter Type Description
context BigcommerceIntegrationContext An auto-generated value prepended to the method as a first parameter.
params GetProductByIdParameters An object containing the ids for products and which additional information about a given product to include

Returns:

Promise<ProductResponse>