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

# Get Product Reviews

> Gets a list of product reviews.




## OpenAPI

````yaml api-reference/v2/openapi-v2-stable.yaml get /products/reviews
openapi: 3.0.3
info:
  title: CoCart - Cart API v2
  version: 4.6.0
  description: >
    CoCart REST API v2 for managing shopping carts, products, and store
    functionality.

    Compared to API v1, this version provides enhanced endpoints for cart
    operations, product management,

    and administrative functions with improved response structures and better
    error handling.
  termsOfService: http://cocartapi.com/terms-of-conditions-polar/
  contact:
    email: support@cocartapi.com
  license:
    name: GNU General Public License v3.0
    url: http://www.gnu.org/licenses/gpl-3.0.html
servers:
  - url: '{protocol}://{host}/wp-json/cocart/v2'
    description: API v2
    variables:
      protocol:
        enum:
          - http
          - https
        default: https
      host:
        default: example-store.com
        description: Your store domain
security: []
tags:
  - name: cart
    description: Operations for managing the shopping cart
  - name: cart-items
    description: Operations for managing cart items
  - name: cart-calculate
    description: Operations for calculating cart totals
  - name: products
    description: Operations for browsing and retrieving product information
  - name: product-attributes
    description: Operations for retrieving product attributes and attribute terms
  - name: product-categories
    description: Operations for browsing and filtering product categories
  - name: product-tags
    description: Operations for browsing and filtering product tags
  - name: product-reviews
    description: Operations for retrieving product reviews and ratings
  - name: product-variations
    description: Operations for retrieving variable product variations
  - name: admin-sessions
    description: Administrative operations for managing cart sessions
  - name: authentication
    description: Operations for user authentication
  - name: store
    description: Operations for retrieving store information and configuration
externalDocs:
  description: Find out more about CoCart API
  url: https://docs.cocartapi.com
paths:
  /products/reviews:
    get:
      tags:
        - product-reviews
      summary: Get product reviews
      description: |
        Gets a list of product reviews.
      parameters:
        - name: page
          in: query
          description: Current page of the collection.
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          description: Maximum number of items to return per page.
          schema:
            type: integer
            default: 10
        - name: search
          in: query
          description: Limit results to those matching a search string.
          schema:
            type: string
        - name: product
          in: query
          description: Limit results to reviews for specific products.
          schema:
            type: array
            items:
              type: integer
      responses:
        '200':
          description: Product reviews retrieved successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProductReview'
              example:
                - id: 567
                  date_created: '2024-09-15T14:30:22'
                  date_created_gmt: '2024-09-15T18:30:22'
                  product_id: 145
                  status: approved
                  reviewer: Sarah Johnson
                  reviewer_email: sarah.j@example.com
                  review: >-
                    These headphones are absolutely fantastic! The sound quality
                    is crystal clear and the noise cancellation works incredibly
                    well. Battery life is even better than advertised. Highly
                    recommend for anyone looking for premium wireless
                    headphones.
                  rating: 5
                  verified: true
                - id: 589
                  date_created: '2024-09-18T09:15:45'
                  date_created_gmt: '2024-09-18T13:15:45'
                  product_id: 145
                  status: approved
                  reviewer: Mike Chen
                  reviewer_email: m.chen@example.com
                  review: >-
                    Great headphones overall. Sound quality is excellent and
                    very comfortable to wear for long periods. Only minor issue
                    is they're a bit bulky for travel, but that's expected with
                    over-ear headphones. Still giving 5 stars!
                  rating: 5
                  verified: true
                - id: 612
                  date_created: '2024-09-22T16:42:10'
                  date_created_gmt: '2024-09-22T20:42:10'
                  product_id: 278
                  status: approved
                  reviewer: Emma Wilson
                  reviewer_email: emma.w@example.com
                  review: >-
                    Love this t-shirt! The cotton is so soft and the fit is
                    perfect. Washes well and doesn't shrink. I've already
                    ordered it in three more colors.
                  rating: 5
                  verified: true
        '400':
          description: Bad request - invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: cocart_invalid_parameter
                message: Invalid parameter provided.
                data:
                  status: 400
components:
  schemas:
    ProductReview:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the resource.
        date_created:
          type: string
          format: date-time
          description: The date the review was created.
        date_created_gmt:
          type: string
          format: date-time
          description: The date the review was created, as GMT.
        product_id:
          type: integer
          description: Unique identifier for the product that the review belongs to.
        status:
          type: string
          description: Status of the review.
        reviewer:
          type: string
          description: Name of the reviewer.
        reviewer_email:
          type: string
          description: Email of the reviewer.
        review:
          type: string
          description: The content of the review.
        rating:
          type: integer
          description: Review rating (0 to 5).
        verified:
          type: boolean
          description: Shows if the reviewer bought the product or not.
    ErrorResponse:
      type: object
      description: Standard error response structure.
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: cocart_invalid_parameter
        message:
          type: string
          description: Human-readable error message.
          example: Invalid parameter provided.
        data:
          type: object
          description: Additional error data.
          properties:
            status:
              type: integer
              description: HTTP status code.
              example: 400
            params:
              type: object
              description: Parameter-specific error details.
              additionalProperties: true
          additionalProperties: true

````