商品评论-更新

Product Review Update Review API 文档

接口信息

  • 接口地址: {your-site-url}/api/skill/product-review/update-review
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 此接口用于更新指定评论

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (JSON Body)

字段 类型 必填 说明
id int ✅ 必填 评论 ID
product_id string/int ✅ 必填 商品 ID
review_content string ✅ 必填 评论内容
star int ✅ 必填 评星,取值范围 1~5
images Array[Object] ✅ 必填 评论图片数组。详见下方 images 子项字段说明。图片需先调用 图片-上传图片 上传获取 src 路径,无图片时传空数组 []
person_name string ✅ 必填 评论人名称
likes_count int ✅ 必填 点赞数,无值时传 0
reviewed_at string ✅ 必填 评论时间,格式如 2026-05-21 10:30:00
verified_purchase int ✅ 必填 是否显示 Verified Purchase 标志。1 = 显示,2 = 不显示
status int ✅ 必填 发布状态。1 = 发布,2 = 不发布
email string ✅ 必填 评论人邮箱,无值时传空字符串 ""
reply_content string ✅ 必填 回复内容,无值时传空字符串 ""
replyed_at string ✅ 必填 回复时间,格式如 2026-05-21 10:30:00,无值时传空字符串 ""
is_feature int ✅ 必填 是否精选评论。1 = 精选,2 = 普通评论
language_code string ✅ 必填 语言简码,无值时传空字符串 ""

images 子项字段

字段 类型 必填 说明
src string ✅ 必填 图片路径。需先调用 图片-上传图片 上传图片获取
width int 选填 图片宽度(px)
height int 选填 图片高度(px)
ratio float 选填 图片宽高比

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/product-review/update-review' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 392,
    "product_id": 7046,
    "review_content": "This product exceeded my expectations! Great quality and fast shipping.",
    "star": 5,
    "images": [
        {
            "src": "/customer_upload/15/image/2026/05/26/d415117a015cf7cf85f38fe6f62e81d4.png",
            "width": 123,
            "height": 120,
            "ratio": 1.03
        },
        {
            "src": "/customer_upload/15/image/2026/05/26/6da29c9b10bd1b4d5c299e2e80845bbe.png",
            "width": 1008,
            "height": 870,
            "ratio": 1.16
        }
    ],
    "person_name": "John Doe",
    "likes_count": 42,
    "reviewed_at": "2026-05-21 10:30:00",
    "verified_purchase": 1,
    "is_feature": 1,
    "status": 1,
    "email": "fecify@126.com",
    "reply_content": "xxxxxx",
    "replyed_at": "2026-05-21 10:30:00",
    "language_code": ""
}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array 返回数据,目前为空数组

注意事项

  1. 此接口为全量更新,更新前建议先调用 商品评论-详细 获取当前完整的评论数据,在此基础上修改需要变更的字段后,再传入全部字段进行保存
  2. 所有字段均为必填,没有值的字段填写空值(如 ""[]),不可省略
  3. star 取值范围 1~5
  4. images 为图片对象数组,每个对象中 src 必填,widthheightratio 为选填。src 需先调用 图片-上传图片 上传图片获取路径
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-05-29 17:12:26

results matching ""

    No results matching ""