Product Reviews


Overview

The product reviews API allows you to view individual or a batch of products.


Create a product review

This API helps you to create a new product review.

createProductReview({})

Parameters

int productId,
String status,
String reviewer,
String reviewerEmail,
String review,
int rating,
bool verified

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
ProductReview productReview = await WooSignal.instance.createProductReview({
    int productId,
    String status,
    String reviewer,
    String reviewerEmail,
    String review,
    int rating,
    bool verified
    });

Response

ProductReview instance

Represents the following object - WooCommerce create a product review


Create a product review

This API helps you to create a new product review.

createProductReview({})

Parameters

int productId,
String status,
String reviewer,
String reviewerEmail,
String review,
int rating,
bool verified

List all product Reviews

Returns product reviews back from WooCommerce, include parameters to query data.

getProductReviews()

Parameters

int page,
int perPage,
String search,
String after,
String before,
List<int> exclude,
List<int> include,
int offset,
String order,
String orderBy,
List<int> reviewer,
List<int> reviewerExclude,
List<String> reviewerEmail,
List<int> product,
String status

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
List<ProductReview> productReviews = await WooSignal.instance.getProductReviews();

Response

List<ProductReview> instance

Represents the following object - WooCommerce list all product reviews