**版本：202601**

# 创建评论

**POST** `/openapi/2026-01/comments`

为指定商品添加评论。

## 请求

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `comment` object (required)

  评论

  - `product_id` string (required)

    评论所属商品的 ID
  - `user_name` string (required)

    发布评论的用户名
  - `star` int32 (required)

    用户提供的评分（范围：1 到 5）
  - `like` int32 (required)

    评论的点赞数
  - `created_at` string (required)

    评论创建时间，格式：YYYY-MM-DD HH:mm:ss
  - `content` string (required)

    评论内容
  - `country` string

    评论所属国家代码（如 CN、US）
  - `images` string[]

    评论图片, URL以分号分隔

```json
{
  "comment": {
    "product_id": "string",
    "user_name": "string",
    "star": 0,
    "like": 0,
    "created_at": "string",
    "content": "string",
    "country": "string",
    "images": [
      "string"
    ]
  }
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `comment` object

    评论

    - `id` int32

      评论的唯一标识
    - `store_id` int32

      评论创建所在店铺的 ID
    - `user_name` string

      发布评论的用户名
    - `email` string

      用户的电子邮件地址（如已提供）
    - `star` string

      用户提供的评分
    - `like` int32

      评论的点赞数
    - `content` string

      评论内容
    - `images` string[]

      评论图片 URL 列表
    - `status` int32

      评论状态：1 为已发布，0 为未发布
    - `type` int32

      评论类型
    - `product_id` string

      与评论关联的商品 ID
    - `created_at` string

      评论创建时间，ISO-8601 格式：YYYY-MM-DD HH:mm:ss
    - `updated_at` string

      评论最后更新时间，ISO-8601 格式
    - `country` string

      评论创建所在国家代码
    - `is_featured` int32

      评论是否为精选（0：否，1：是）
    - `is_verified` int32

      评论是否已验证（0：否，1：是）
    - `client_id` string

      创建评论的客户端 ID
    - `anonymous` int32

      评论是否匿名发布（0：否，1：是）
    - `product_published` int32

      商品是否已发布

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "comment": {
      "id": 0,
      "store_id": 0,
      "user_name": "string",
      "email": "string",
      "star": "string",
      "like": 0,
      "content": "string",
      "images": [
        "string"
      ],
      "status": 0,
      "type": 0,
      "product_id": "string",
      "created_at": "string",
      "updated_at": "string",
      "country": "string",
      "is_featured": 0,
      "is_verified": 0,
      "client_id": "string",
      "anonymous": 0,
      "product_published": 0
    }
  }
}
```
