Last update:
August 26, 2024
REST API¶
Access the REST API endpoint and select VirtoCommerce.CustomerReviews from the dropdown list.
Below are some examples of using REST API functionality to:
Submit reviews¶
- Select POST /api/customer reviews from the menu.
-
Fill in the request body as follows:
-
Click Execute.
-
In the platform, select Rating and Reviews from the main menu.
-
In the next blade, click on the newly created review:
View reviews¶
- Select POST /api/customer reviews/reviewList from the menu.
-
Fill in the request body as follows:
-
Click Execute to receive the following response:
{ "totalCount":7, "results":[ { "id":"fc9a07db-f09f-4a85-bafc-f5e9299d3301", "entityId":"8c01bcf0-4bab-4675-97b9-ea6cc41912e5", "entityName":"Aunkler's Favorite Product", "entityType":"Product", "reviewStatus":"Approved", "reviewStatusId":1, "title": "Demo Product Review", "review": "Nice Product. I liked it", "rating":5, "userName":"Alex B.", "storeName":"Electronics", "createdDate":"2022-10-04T03:46:43.433Z" }, {...} ] }
Request rating¶
- Select POST /api/rating/entityRating from the menu.
-
Fill in the request body as follows:
-
Click Execute to receive the following response:
Moderate reviews¶
- Select POST /api/customerReviews/approve from the menu.
-
Fill in the request body as follows:
-
Click Execute.
- Select POST /api/customerReviews/reject from the menu.
-
Fill in the request body as follows:
-
Click Execute.
- Select POST /api/customerReviews/reset from the menu.
-
Fill in the request body as follows:
-
Click Execute.