getReview( )
Retrieves a review.
Description
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
.
Syntax
function getReview(reviewId: string, options: GetReviewOptions): Promise<Review>
getReview Parameters
NAME
TYPE
DESCRIPTION
Review ID.
Information about the reviews to retrieve.
Returns
Review.
Return Type:
NAME
TYPE
DESCRIPTION
Date and time the review was created.
Review ID.
Date and time the review was updated.
Author of the review.
Review content.
ID of the entity to review. For example, a Wix Stores product ID.
Number of site visitors who found the review helpful.
Number of site visitors who found the review unhelpful.
Helpfulness score.
Calculated by subtracting foundUnhelpful
from foundHelpful
.
Moderation status of the review.
Review namespace. Currently integrated with Wix Stores, as stores
.
Provides information about the origin of the review. Organic reviews are created by site visitors or members. App reviews are created by apps even though a site visitor or member is the author of the review. Apps can not create or update organic reviews.
Reply to the review.
Date and time then review was written. It should the same time as created_date except for reviews that were imported from the other review system.
Revision number, which increments by 1 each time the review is updated. To prevent conflicting changes, the current revision must be passed when updating the review. Ignored when creating a review.
Indicates whether the review has been verified through a Verify Product Purchase call to the Review Product catalog SPI.
Was this helpful?
getReview example
1import { reviews } from 'wix-reviews.v2';23 async function getReview(reviewId, options) {4 try {5 const result = await reviews.getReview(reviewId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13