This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a review.
The getReview()
function returns a Promise that resolves to the retrieved review.
By default, an unpublished review is not returned. To retrieve an unpublished review, pass returnPrivateReviews
as true
.
function getReview(
reviewId: string,
options: GetReviewOptions,
): Promise<Review>;
Review ID.
Information about the reviews to retrieve.
import { reviews } from "wix-reviews.v2";
async function getReview(reviewId, options) {
try {
const result = await reviews.getReview(reviewId, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.