需要 write_content 权限点。
更多权限点使用信息,请参考:
PUT https://{handle}.myshopline.com/admin/openapi/v20250601/store/comments/:comment_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
更新评论
路径参数
  • comment_id string required
    评论id
    Example: 63aaa20f6b7b014b289c0765
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • author string
    评论的作者
    Example: demo-author
  • body string
    评论内容
    Example: demo-content
  • body_html string
    含有html标记的body内容
    Example: <p>demo-content</p>
  • email string
    评论作者的邮件地址
    Example: demo@qq.com
  • ip string
    发表评论的ip
    Example: 172.28.173.136
  • published_at string
    发布评论的时间 ISO 8601
    Example: 2022-08-03T10:45:00+08:00
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • commentobject
    评论信息
  • author string
    评论的作者
    Example: demo-author
  • blog_collection_id string
    评论所属的文章归属的博客集合id
    Example: 639bfda0ee877c4a9bd600b6
  • blog_id string
    评论所属博客id
    Example: 63a2afa527797d5cedcecb52
  • body string
    评论内容
    Example: demo-content
  • body_html string
    含有html标记的body内容
    Example: <p>demo-content</p>
  • create_at string
    评论的创建时间 ISO 8601
    Example: 2022-08-03T10:45:00+08:00
  • email string
    评论作者的邮件地址
    Example: demo@qq.com
  • id string
    评论id
    Example: 63aaa20f6b7b014b289c0765
  • ip string
    发表评论的ip
    Example: 172.28.173.136
  • published_at string
    发布评论的时间 ISO 8601
    Example: 2022-08-03T10:45:00+08:00
  • status string
    评论状态,枚举值:unapproved(默认状态,评论等待批准,C端不展示此状态评论); published:(已发布状态,并且对C端用户可见); spam:(垃圾评论,C端用户不可见); removed:(评论标记为已删除状态,C端用户不可见)
    Example: unapproved
  • updated_at string
    更新时间 ISO 8601
    Example: 2022-08-03T10:45:00+08:00
  • user_agent string
    用户代理
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required

Body

required
{
  "author": "demo-author",
  "body": "demo-content",
  "body_html": "<p>demo-content</p>",
  "email": "demo@qq.com",
  "ip": "172.28.173.136",
  "published_at": "2022-08-03T10:45:00+08:00\t\n"
}

Language

curl --request PUT \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/store/comments/comment_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json' \
--data '
{
"author": "demo-author",
"body": "demo-content",
"body_html": "<p>demo-content</p>",
"email": "demo@qq.com",
"ip": "172.28.173.136",
"published_at": "2022-08-03T10:45:00+08:00\t\n"
}
'
Examples
更新评论
Request
{
"author": "demo-author",
"body": "demo-content",
"body_html": "<p>demo-content</p>",
"email": "demo@qq.com",
"ip": "172.28.173.136",
"published_at": "2022-08-03T10:45:00+08:00\t\n"
}
Response
{
"comment": {
"author": "demo-author",
"blog_collection_id": "632c137a0fe5b42e60a04b62",
"blog_id": "63357995840927149ba6c75c",
"body": "demo-content",
"body_html": "<p>demo-content</p>",
"create_at": "2022-11-25T12:12:54+08:00",
"email": "demo@qq.com",
"id": "638040c6a0a9ba4487960880",
"ip": "172.28.173.136",
"published_at": "2022-08-03T10:45:00+08:00",
"status": "published",
"updated_at": "2022-12-27T20:52:25+08:00"
}
}
这篇文章对你有帮助吗?

Error loading component.

Error loading component.