Rating

Get product rating

Changed on

Retrieves the rating of a product.

Permissions

This endpoint does not require permissions.

get/reviews-and-ratings/api/rating/{productId}

Request

  • Base URL
    https://storecomponents.myvtex.com
  • URL
    https://storecomponents.myvtex.com/reviews-and-ratings/api/rating/{productId}
  • Auth
    • API key in header X-VTEX-API-AppKey and API key in header X-VTEX-API-AppToken
    • or API key in header VtexIdclientAutCookie

Path parameters

productIdstring required
Example:1

Product ID.

Headers

Content-Typestring required

Describes the type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Response

OK

averagenumber

Average rating of the product.

totalCountnumber

Total amount of ranting of the product.

starsFivenumber

Total five-star ratings received by the product.

starsFournumber

Total four-star ratings received by the product.

starsThreenumber

Total three-star ratings received by the product.

starsTwonumber

Total two-star ratings received by the product.

starsOnenumber

Total one-star ratings received by the product.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added