Get Comment List

🔒

Requires read_comment access scope. For more access scope

The Get Comment List API retrieves a list of comments for a specific product or across multiple products, based on various filters. This API allows users to sort, filter, and paginate the comments, making it easier to manage product reviews and feedback.This API is especially useful for:

1.Fetching customer reviews for a product.

2.Filtering comments by creation or update time for analytics.

3.Managing comment status, such as published or unpublished.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeRequiredExampleDescription
product_idstringNoa1b2c3d4-e5f6-7g8h-9i0jProduct's ID to filter comments.
created_at_minstringNo2018-10-01T16:15:47-04:00Filters comments created at or after this date. Format: YYYY-MM-DDTHH:mm:ssZ.
created_at_maxstringNo2018-10-02T16:15:47-04:00Filters comments created at or before this date. Format: YYYY-MM-DDTHH:mm:ssZ.
updated_at_minstringNo2018-10-01T16:15:47-04:00Filters comments updated at or after this date. Format: YYYY-MM-DDTHH:mm:ssZ.
updated_at_maxstringNo2018-10-02T16:15:47-04:00Filters comments updated at or before this date. Format: YYYY-MM-DDTHH:mm:ssZ.
sort_bystringNostarSpecify the sort field. e.g.star or created_at
sort_directionstringNoascSpecify the sort direction. asc or desc
pageint32No1Page number. Defaults to 1.
limitint32No10Limit per page. Allowed values: 10, 20, 50, 100.
statusstringNo1Comment status. 1 for published, 0 for unpublished.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

Field Type Example Description
comments array - List of comments returned.
comments.id string 23532434 Unique identifier of the comment.
comments.store_id string 633130 Identifier for the store associated with the comment.
comments.username string Joey Username of the commenter.
comments.email string "" Email address of the commenter (if available).
comments.star string 5.0 Star rating given by the commenter.
comments.like string 10 Number of likes received by the comment.
comments.content string Cheap but beautiful Content of the comment.
comments.img string ["image1.jpg", "image2.jpg"] Array of image URLs associated with the comment.
comments.status string 1 Status of the comment: 1 for published, 0 for unpublished.
comments.type string 1 Type of the comment:
  • 1: Buyer's real comments
  • 2: Custom comments
comments.product_id string a1a88be0-a1d4-47e4-a2f2-ba6e131cf447 UUID of the product the comment is associated with.
comments.created_at string 2024-04-24 14:02:39 Timestamp when the comment was created.
comments.updated_at string 2024-04-25 08:22:59 Timestamp when the comment was last updated.
comments.country string CN Country code of the commenter.
comments.is_featured string 0 Indicates if the comment is featured:
  • 1: Featured
  • 0: Not featured
comments.is_verified string 0 Indicates if the comment is verified:
  • 1: Verified
  • 0: Not verified
comments.client_id null null Client identifier if available.
comments.anonymous string 0 Indicates if the comment is anonymous:
  • 1: Anonymous
  • 0: Not anonymous
total string 6 Total number of comments available for the given filters.
page string 1 Current page of the comments being returned.

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "params is invalid"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorArray "store is not active"Indicates an error encountered during the process.

Error Details

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
404Invalid or empty store nameinvalid store name{ "errors": store is not active}
422params is invalidThe params provided are not correct, please check the field such as like,star,name and content{ "errors": ["params is invalid"]}

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!