Skip to main content
GET
/
comments
/
product
/
{productId}
Get product comments
curl --request GET \
  --url https://store.salesive.com/api/v1/comments/product/{productId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "status": 200,
  "success": true,
  "data": {
    "comments": [
      {}
    ],
    "pagination": {}
  }
}

Request

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

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop.

Path parameters

ParameterTypeRequiredDescription
productIdstringYesProduct identifier.

Query parameters

ParameterTypeDescription
pageintegerPage number (default: 1).
limitintegerComments per page (default: 10).

Successful response

{
    "status": 200,
    "success": true,
    "message": "Comments retrieved successfully",
    "data": {
        "comments": [
            {
                "_id": "696cec2f1f6748186587748e",
                "content": "Test comment for documentation",
                "image": null,
                "user": {
                    "_id": "69360693a7a8f7dc8ae32d6d",
                    "name": "Dev Bash",
                    "avatar": "https://cdn-icons-png.flaticon.com/512/149/149071.png"
                },
                "product": "68e5bb463a1fc56a8ac150bf",
                "shop": "68b8f52575da81b332af29f1",
                "parent": null,
                "likes": [],
                "dislikes": [],
                "likeCount": 0,
                "dislikeCount": 0,
                "replyCount": 0,
                "isDeleted": false,
                "createdAt": "2026-01-18T14:20:31.971Z",
                "updatedAt": "2026-01-18T14:20:31.971Z"
            }
        ],
        "total": 1,
        "commentCount": 1,
        "page": 1,
        "totalPages": 1
    }
}

Error response

{
    "status": 404,
    "success": false,
    "message": "Product not found",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

productId
string
required

Product identifier

Query Parameters

page
integer
default:1

Page number

limit
integer
default:10

Items per page

Response

200 - application/json

Comments retrieved successfully

status
integer
Example:

200

success
boolean
Example:

true

data
object