{"files":{"SKILL.md":"---\nname: reviews-and-ratings-api\ndescription: \"Reviews and Ratings API skill. Use when working with Reviews and Ratings for reviews-and-ratings. Covers 8 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Reviews and Ratings API\nAPI version: 1.0\n\n## Auth\nApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n\n## Base URL\nhttps://storecomponents.myvtex.com\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /reviews-and-ratings/api/reviews -- verify access\n3. POST /reviews-and-ratings/api/reviews -- create first reviews\n\n## Endpoints\n\n8 endpoints across 1 groups. See references/api-spec.lap for full details.\n\n### reviews-and-ratings\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /reviews-and-ratings/api/rating/{productId} | Get product rating |\n| GET | /reviews-and-ratings/api/review/{reviewId} | Get product review by review ID |\n| DELETE | /reviews-and-ratings/api/review/{reviewId} | Delete review |\n| PATCH | /reviews-and-ratings/api/review/{reviewId} | Update a review |\n| GET | /reviews-and-ratings/api/reviews | Get list of reviews |\n| POST | /reviews-and-ratings/api/reviews | Create multiple reviews |\n| DELETE | /reviews-and-ratings/api/reviews | Delete multiple reviews |\n| POST | /reviews-and-ratings/api/review | Create a review |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Get rating details?\" -> GET /reviews-and-ratings/api/rating/{productId}\n- \"Get review details?\" -> GET /reviews-and-ratings/api/review/{reviewId}\n- \"Delete a review?\" -> DELETE /reviews-and-ratings/api/review/{reviewId}\n- \"Partially update a review?\" -> PATCH /reviews-and-ratings/api/review/{reviewId}\n- \"List all reviews?\" -> GET /reviews-and-ratings/api/reviews\n- \"Create a review?\" -> POST /reviews-and-ratings/api/reviews\n- \"Create a review?\" -> POST /reviews-and-ratings/api/review\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get reviews-and-ratings-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search reviews-and-ratings-api\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@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"}}