> ## Documentation Index
> Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get product reviews by product ID



## OpenAPI

````yaml /loyalty/storefront-api-swagger.json get /loyalty/cp/api/product-review-details/{productId}
openapi: 3.0.1
info:
  description: ''
  title: Storefront APIs
  version: 0.0.1
servers:
  - url: https://loyalty-admin.appstle.com
security: []
tags:
  - description: >-
      Storefront APIs for the signed-in customer to enroll, enable the loyalty
      program, view their loyalty profile, sync metafields, and update profile
      attributes.
    name: Customer Enrollment & Profile
  - description: >-
      Storefront APIs for the signed-in customer to view point transactions,
      claim social-media reward points, and record store visits.
    name: Points & Earn Rules
  - description: >-
      Storefront APIs for the signed-in customer to redeem loyalty points for
      rewards or discount codes.
    name: Redemptions & Discount Codes
  - description: >-
      Storefront APIs for managing the signed-in customer's referral activity:
      generating referral URLs, sending invites, viewing referral history, and
      accepting referral offers.
    name: Referrals
  - description: >-
      Storefront APIs for the signed-in customer to submit product reviews and
      retrieve existing reviews for a product.
    name: Reviews
  - description: >-
      Storefront APIs for retrieving product and collection data, proxied
      through the Shopify Storefront API for loyalty widgets.
    name: Product Catalog
paths:
  /loyalty/cp/api/product-review-details/{productId}:
    get:
      tags:
        - Reviews
      summary: Get product reviews by product ID
      operationId: getAllProductReviewsByProductId
      parameters:
        - description: ID of the product to get reviews for
          example: 12345
          in: path
          name: productId
          required: true
          schema:
            format: int64
            type: integer
        - description: Filter reviews by rating (1-5 stars)
          example: 5
          in: query
          name: rating
          required: false
          schema:
            format: int32
            type: integer
        - description: Zero-based page index (0..N)
          in: query
          name: page
          required: false
          schema:
            default: 0
            minimum: 0
            type: integer
        - description: The size of the page to be returned
          in: query
          name: size
          required: false
          schema:
            default: 20
            minimum: 1
            type: integer
        - description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          in: query
          name: sort
          required: false
          schema:
            items:
              type: string
            type: array
      responses:
        '200':
          content:
            application/json:
              example:
                - body: This product exceeded my expectations in every way.
                  createAt: '2025-01-15T10:30:00Z'
                  productId: 12345
                  productImage: https://cdn.shopify.com/image.jpg
                  productTitle: Premium Widget
                  publishedStatus: true
                  rating: 5
                  reviewerName: John Doe
                  title: Excellent product!
              schema:
                $ref: '#/components/schemas/ProductReviewDTO'
          description: >-
            Product reviews retrieved successfully with pagination headers
            (X-Total-Count, Link)
        '400':
          description: Invalid product ID
components:
  schemas:
    ProductReviewDTO:
      properties:
        body:
          type: string
        createAt:
          format: date-time
          type: string
        pinned:
          type: boolean
        productHandle:
          type: string
        productId:
          format: int64
          type: integer
        productImage:
          type: string
        productTitle:
          type: string
        publishedStatus:
          type: boolean
        rating:
          format: int32
          type: integer
        replayBody:
          type: string
        replayDate:
          format: date-time
          type: string
        reviewerName:
          type: string
        title:
          type: string
      type: object

````