{"note":"OpenAPI conversion -- returning structured metadata","name":"vtex-local-reviews-and-ratings-api","description":"Reviews and Ratings API","version":"1.0","base_url":"https://storecomponents.myvtex.com","endpoints":8,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Reviews and Ratings API\n@base https://storecomponents.myvtex.com\n@version 1.0\n@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n@common_fields {Content-Type: str=application/json # Describes the type of the content being sent., Accept: str=application/json # HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.}\n@endpoints 8\n@toc reviews-and-ratings(8)\n\n@endpoint GET /reviews-and-ratings/api/rating/{productId}\n@desc Get product rating\n@required {productId: str # Product ID.}\n@returns(200) {average: num, totalCount: num, starsFive: num, starsFour: num, starsThree: num, starsTwo: num, starsOne: num} # OK\n@errors {404: Not Found}\n\n@endpoint GET /reviews-and-ratings/api/review/{reviewId}\n@desc Get product review by review ID\n@required {reviewId: str # Review ID.}\n@returns(200) {id: str, productId: str, rating: num, title: str, text: str, reviewerName: str, shopperId: str, reviewDateTime: str, searchDate: str, verifiedPurchaser: bool, sku: str?, approved: bool, location: str?, locale: str?, pastReviews: str?} # OK\n@errors {404: Not Found, 500: Internal Server Error}\n\n@endpoint DELETE /reviews-and-ratings/api/review/{reviewId}\n@desc Delete review\n@required {reviewId: str # Review ID.}\n@returns(200) OK\n\n@endpoint PATCH /reviews-and-ratings/api/review/{reviewId}\n@desc Update a review\n@required {reviewId: str # Review ID., productId: str # Product ID., rating: num # Customer rating., title: str # Review's title., text: str # Review's text., reviewerName: str # Reviewer name.}\n@optional {shopperId: str # Shopper email., verifiedPurchaser: bool # Indicates if the reviewer is a verified purchaser (`true`) or not (`false`)., locale: str # Review's locale.}\n@returns(200) {id: str, productId: str, rating: num, title: str, text: str, reviewerName: str, shopperId: str, reviewDateTime: str, searchDate: str, verifiedPurchaser: bool, sku: str?, approved: bool, location: str?, locale: str?, pastReviews: str?} # OK\n@example_request {\"productId\":\"1\",\"rating\":5,\"title\":\"Great product\",\"text\":\"Great product.\",\"reviewerName\":\"Arturo\",\"shopperId\":\"user@email.com\",\"verifiedPurchaser\":false,\"locale\":\"en-US\"}\n\n@endpoint GET /reviews-and-ratings/api/reviews\n@desc Get list of reviews\n@optional {search_term: str # Returns Reviews that contain the search term in `productId`, `sku`, `shopperId`, or `reviewerName`., from: str # Zero base starting record number, `0` is the default value., to: str # Zero base ending record number, `3` is the default value., order_by: str # Field name to order records. The field name must have the first letter uppercase. Allowed field names: `ProductId`, `ShopperId`, `Approved`, `ReviewDateTime`, `SearchDate`, `Rating`, `Locale`. Optionally add `:asc` or `:desc`., status: bool # Status of the review, approved (`true`) or not (`false`)., product_id: str # Filter the reviews by product ID.}\n@returns(200) {data: [map], range: map{total: num, from: num, to: num}} # OK\n\n@endpoint POST /reviews-and-ratings/api/reviews\n@desc Create multiple reviews\n@returns(200) OK\n@example_request [{\"id\":\"1\",\"productId\":\"65444\",\"rating\":4,\"title\":\"Great product\",\"text\":\"Great product!\",\"reviewerName\":\"Arturo\",\"approved\":true},{\"id\":\"2\",\"productId\":\"65444\",\"rating\":4,\"title\":\"Great product\",\"text\":\"Great product!\",\"reviewerName\":\"Arturo\",\"approved\":true}]\n\n@endpoint DELETE /reviews-and-ratings/api/reviews\n@desc Delete multiple reviews\n@returns(200) OK\n@example_request [\"babefcf4-e0f7-11ec-835d-16c4e59c4351\",\"c123def5-e0f7-11ec-835d-16c4e59c4352\"]\n\n@endpoint POST /reviews-and-ratings/api/review\n@desc Create a review\n@required {productId: str # Product ID., rating: int(int32) # Customer rating., title: str # Review's title., text: str # Review's text., reviewerName: str # Reviewer name., approved: bool # Indicates if the review was approved (`true`) or not (`false`).}\n@returns(200) {id: str, productId: str, rating: num, title: str, text: str, reviewerName: str, shopperId: str, reviewDateTime: str, searchDate: str, verifiedPurchaser: bool, sku: str?, approved: bool, location: str?, locale: str?, pastReviews: str?} # OK\n@example_request {\"productId\":\"65444\",\"rating\":5,\"title\":\"Good Product\",\"text\":\"It is the best product that I have seen\",\"reviewerName\":\"Arturo\",\"approved\":true}\n\n@end\n"}