open api 评论相关接口
一.评论列表
1. 请求地址
method:POST
正式:http://www.daoway.cn/daoway/rest/openapi/comment/list
测试:http://test.daoway.cn/daoway/rest/openapi/comment/list
2. 请求参数址
字段 | 类型 | 必须 | 说明 |
---|---|---|---|
channel | string | 是 | 渠道号,由到位分配 |
storeId | string | 是 | 店铺ID |
filter | string | 是 | all:全部;good:好评;average:中评;bad:差评;hasImg:有图 |
productId | string | 否 | 服务项目ID,只返回该服务项目的评论 |
start | int | 否 | 起始游标 |
size | int | 否 | 返回数量 |
sign | String | 是 | rsa签名与验签 |
3. 返回说明
{
"status": "ok",
"data": {
"goodCount": 21,//好评数
"totalCount": 25,//全部评论数
"averageCount": 0,中评数
"badCount": 0,差评数
"hasImgCount": 4,有图评论数
"comments": [
{
"portrait": null,//用户的头像
"nickname": "廖三日",//用户的昵称
"star": 5,//评论的星级
"comment": "师傅非常负责,也很热情,东西无损坏,效率也高,好评",
"createtime": 1487580438000,
"id": "3f4795bd48c54a6d8c3c0c477d04c35f",
"replyComment": null,//商家回复
"replyTime": null,//商家回复的时间
"storeId": "dab8bd7932194f07ba754b116f196bbd",//商家店铺ID
"storeName": "蓝犀牛",////商家店铺名称
"imgPath": null,评论图 多图用半角逗号分割
"likeNum": 0,
"commentNum": 0,
"imgThumbPath": null,//评论的缩略图 多图用半角逗号分割
"city": "成都",
"area": "武侯区"
}
]
}
}
二.发表评论
1. 请求地址
method:POST
正式:http://www.daoway.cn/daoway/rest/openapi/comment/publish
测试:http://test.daoway.cn/daoway/rest/openapi/comment/publish
2. 请求参数
字段 | 类型 | 必须 | 说明 |
---|---|---|---|
channel | string | 是 | 渠道号,由到位分配 |
orderId | string | 是 | 订单ID |
comment | string | 是 | 评论 |
imgPath | string | 否 | 图片的URL,多图用半角逗号分割 |
score | int | 否 | 评分 1~5 |
sign | String | 是 | rsa签名与验签 |
3. 返回说明
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
status | string | ok | ok或error |
msg | string | 返回信息 |
三.删除评论
1. 请求地址
method:POST
正式:http://www.daoway.cn/daoway/rest/openapi/comment/delete
测试:http://test.daoway.cn/daoway/rest/openapi/comment/delete
2. 请求参数说明
名称 | 类型 | 是否必须 | 示例值 | 描述 |
---|---|---|---|---|
channel | string | 是 | nuomi | 渠道号,由到位分配 |
commentId | string | 是 | 评论id | |
3. 返回说明
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
status | string | ok | ok或error |
msg | string | 返回信息 |