Alokai

getProductReview

Method to fetch a review of a product by the ID

This method sends a GET request to the getProductReview endpoint of the Vue Storefront API Middleware. In turn, it receives data from the getProductReview endpoint exposed by the BigCommerce API

Signature

declare function getProductReview(
	props: GetProductReviewProps,
	options?: MethodOptions
): Promise<ProductReviewResponse>;

Parameters

NameRequiredTypeDescription
propsRequiredGetProductReviewPropsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.
optionsOptionalMethodOptions

Returns

Returns a response with the product reviews

Referenced Types

Examples

Fetching a review for a product. Sending it this way, the response can be cached safely.

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

const getProductReviewResponse = await sdk.bigcommerce.getProductReview({
 productId: 132,
 reviewId: 91
});

On this page