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

# Get product comments

> Retrieve top-level comments for a specific product.

## Request

```http theme={null}
GET /comments/product/68e5bb463a1fc56a8ac150bf?page=1&limit=10
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
```

## Headers

| Header          | Type   | Description                                   |
| --------------- | ------ | --------------------------------------------- |
| `Authorization` | string | Provide the customer token as `Bearer <jwt>`. |
| `x-shop-id`     | string | Identify the shop.                            |

## Path parameters

| Parameter   | Type   | Required | Description         |
| ----------- | ------ | -------- | ------------------- |
| `productId` | string | Yes      | Product identifier. |

## Query parameters

| Parameter | Type    | Description                      |
| --------- | ------- | -------------------------------- |
| `page`    | integer | Page number (default: 1).        |
| `limit`   | integer | Comments per page (default: 10). |

## Successful response

```json theme={null}
{
    "status": 200,
    "success": true,
    "message": "Comments retrieved successfully",
    "data": {
        "comments": [
            {
                "_id": "6a27d777289b87893fcbde5a",
                "content": "Great product! Does it come in other colours?",
                "image": null,
                "user": {
                    "_id": "69360693a7a8f7dc8ae32d6d",
                    "name": "Jane Smith",
                    "role": "user",
                    "avatar": "https://cdn.salesive.com/avatars/jane.jpg"
                },
                "product": "69fb494e51280f9f65d059ae",
                "shop": "68b8f52575da81b332af29f1",
                "parent": null,
                "likes": [],
                "dislikes": [],
                "likeCount": 0,
                "dislikeCount": 0,
                "replyCount": 1,
                "isDeleted": false,
                "createdAt": "2026-06-09T09:05:59.337Z",
                "updatedAt": "2026-06-09T09:05:59.337Z",
                "__v": 0
            }
        ],
        "total": 1,
        "commentCount": 1,
        "page": 1,
        "totalPages": 1
    }
}
```

## Error response

```json theme={null}
{
    "status": 404,
    "success": false,
    "message": "Product not found",
    "data": {}
}
```


## OpenAPI

````yaml GET /comments/product/{productId}
openapi: 3.1.0
info:
  title: Salesive Store API
  description: >-
    REST interface for querying products, categories, and merchandising banners
    exposed by Salesive storefronts.
  version: 1.0.0
servers:
  - description: Production
    url: https://store.salesive.com/api/v1
security:
  - BearerAuth: []
    ShopIdHeader: []
paths:
  /comments/product/{productId}:
    get:
      summary: Get product comments
      description: Retrieve top-level comments for a specific product.
      parameters:
        - $ref: '#/components/parameters/XShopIdHeader'
        - name: productId
          in: path
          required: true
          schema:
            type: string
          description: Product identifier
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          description: Page number
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
          description: Items per page
      responses:
        '200':
          description: Comments retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      comments:
                        type: array
                        items:
                          type: object
                      pagination:
                        type: object
components:
  parameters:
    XShopIdHeader:
      name: x-shop-id
      in: header
      description: >-
        Optional identifier that scopes responses to a specific storefront when
        the referer cannot be inferred.
      required: false
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT issued by the Salesive Store API for authenticated shoppers.
    ShopIdHeader:
      type: apiKey
      in: header
      name: x-shop-id
      description: >-
        Optional storefront identifier sent as a header to scope responses to a
        specific shop. Try It requests remember this value once provided.

````