Alokai

createProductReview

Method to create a product review

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

Signature

declare function createProductReview$1(
	props: CreateProductReviewProps,
	options?: MethodOptions
): Promise<ProductReviewResponse>;

Parameters

NameRequiredTypeDescription
propsRequiredCreateProductReviewPropsParameter 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 created product review

Referenced Types

Examples

Creating a new product review.

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

const createProductReviewResponse = await sdk.bigcommerce.createProductReview({
 title: 'New review',
 productId: 132
});

On this page