# Transaction evaluation - Evaluation management interface
"Weixin Mini Program transaction evaluation" is a true and fair evaluation system provided by the official Mini Program. Trading users in the Mini Program can rate a certain trading experience and post suggestions and feelings. The following interfaces are provided to Weixin Mini Program developers for querying, replying, and processing Mini Program user transaction evaluation.
- 2.1 Create a comment
- 2.2 Delete comment
- 3.1 Create a reply
- 3.2 Delete reply
# 1 - Inquiries
Use this interface can query a Weixin Mini Program, all evaluation related content.
# 1.1 Query a list of reviews
Query all the comments below a Weixin Mini Program.
# How to request
GET
# Request URL
https://api.weixin.qq.com/wxaapi/comment/mpcommentlist/get
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/mpcommentlist/get?filterType=1&offset=0&limit=8&startTime=1588237130&endTime=1588237131&access_token=xxxx
The query parameters include
{
startTime: "1588237130",
endTime: "1588237131",
filterType: 1,
offset: 0,
limit: 8,
access_token: 'xxxx'
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
startTime | String | yes | The start time of the query period |
endTime | String | yes | The end time of the query period |
filterType | Number | no | Filter data types, enumerations refer to the table below |
offset | Number | no | The offset of the query (counting pull from offset), the default value is 0 for the home page pull |
limit | Number | no | Query the number in each page. The default value is 8 |
# Evaluation type filter enumeration (filterType)
value | Introductions |
---|---|
1 | All bad reviews, all reviews with a rating of 1 and 2 stars |
2 | All positive reviews, all reviews with a rating of 4 and 5 stars |
3 | Bad reviews are pending, and all evaluations that have not been submitted for "reconciliation" are not submitted |
4 | Developers awaiting reply, all reviews awaiting developer reply |
5 | Bad reviews have been revised |
6 | All reviews, all good reviews, bad reviews, and moderate reviews (3 stars) |
# Return the example correctly
{
errcode: 0,
success: true,
commentList: [{
commentId: "2797755680173111111",
amount: 100,
orderId: "payorder@_4200001761202302096311111111",
payTime: "1675915718",
wxPayId: "4200001761202302096311111111",
orderInfo: {
busiOrderId: 'xxxxxx'
},
userInfo: {
openid: "xxxxxxxxxx",
headImg: "http://wx.qlogo.cn/mmhead/xxxxxxxxxxx",
nickName: "test"
},
bizInfo: {
appid: "wx1234567890",
headImg: "http://wx.qlogo.cn/mmhead/xxxxxxxxxxxx",
nickName: "xxx"
},
score: 200, // 200分对应2星,每100分就是1星
createTime: "1676351504",
content: {
media: [{img: 'http://xxx', thumbImg: 'http://xxx'}],
txt: "一般吧 我总感觉这个成分很伤皮肤,用了之后一直很干燥,不是很喜欢这款产品"
},
extInfo: {
isAlreadySendTmpl: false,
},
productInfo: {
productList: [
{
name: "纸巾一张",
picUrl: "https://xxxxxx",
}
]
}
}],
total: 3,
offset: 0,
}
# Return the meaning of the parameter
attribute | type | Introductions | |||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errcode | Number | Error code | |||||||||||||||||||||||||||||||||||||||||||
offset | Number | Offset of the query (pull count starting with offset) | |||||||||||||||||||||||||||||||||||||||||||
total | Number | Total number of evaluations | |||||||||||||||||||||||||||||||||||||||||||
commentList | Array < Object > | The list of evaluations is as follows | |||||||||||||||||||||||||||||||||||||||||||
|
Specific parameters of userInfo
parameter | type | Introductions |
---|---|---|
openid | String | Rating User openid |
headImg | String | Rate the user's profile picture |
nickName | String | The nickname of the user who rated |
Specific parameters of orderInfo
parameter | type | Introductions |
---|---|---|
busiOrderId | String | Merchant number: An order number within the merchant system, which can only be a number, uppercase and lowercase letters_- * and unique under the same merchant number;Is out_trade_no in the WeChat payment interface document |
Specific parameters of bizInfo
parameter | type | Introductions |
---|---|---|
appid | String | Weixin Mini Program AppID |
headImg | String | Weixin Mini Program |
nickName | String | Nickname for Weixin Mini Program |
Specific parameters of content
attribute | type | Introductions | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
txt | String | Contents of the evaluation | |||||||||||||||||||
media | Array< Object > | Evaluate media files such as pictures and videos. There can only be one video and one picture at the same time. If the picture is a picture, there will only be one picture if it is a video. | |||||||||||||||||||
|
Specific parameters of extInfo
parameter | type | Introductions |
---|---|---|
isAlreadySendTmpl | Boolean | Have you sent a "Bad Ratings Customer Service Session"? |
Specific parameters of productInfo
parameter | type | Introductions |
---|---|---|
productList | Array< Object > | List of Products |
productList.name | String | Trade name |
productList.picUrl | String | Image of the product |
# 1.2 Query a list of reviews
Look up all the comments and responses below a review. (Currently, the first response created by a developer is defined as a comment, and subsequent responses are based on that comment. Future comments will be made on how a response is developed.)
# How to request
GET
# Request URL
https://api.weixin.qq.com/wxaapi/comment/replyandcommentreplylist/get
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/replyandcommentreplylist/get?commentId=123456&access_token=xxxx
The query parameters include
{
commentId: '123456',
access_token: 'xxxx' // 登录凭证
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
# Return the example correctly
{
errcode: 0,
list: {
reply: { // 评论(评论回复第一条内容)
commentId: '123',
replyId: '1'
createTime: '1669032337',
updateTime: '1669032341',
replyContent: { content: '999' },
replyObject: {
nickname: '小程序名称',
imgUrl: 'http://xxx/xx'
},
},
commentReplyList: [ // 回复(评论回复第二条及之后的所有集合)
{
commentId: '12345',
commentReplyId: '1'
createTime: '1669032388',
updateTime: '1669032392',
commentReplyContent: { content: 'uuuuuuuuu' },
commentReplyObject: { nickname: '啊哈', imgUrl: 'xxx' },
}
]
}
}
# Return the meaning of the parameter
Meaning of parameters under reply (comments)
attribute | type | Introductions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
commentId | String | Evaluation id | ||||||||||
replyId | String | Comment id | ||||||||||
createTime | String | Creation time, in seconds | ||||||||||
updateTime | String | Updated time, in seconds | ||||||||||
replyContent.content | String | The content of the response | ||||||||||
replyObject | Object | The content of the comments | ||||||||||
|
Parameter meaning under commentReplyList
attribute | type | Introductions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
commentId | String | Evaluation id | ||||||||||
commentReplyId | String | Reply id | ||||||||||
createTime | String | Evaluation creation time, in seconds | ||||||||||
updateTime | String | Updated time, in seconds | ||||||||||
commentReplyContent.content | String | The content of the response | ||||||||||
commentReplyObject | Object | The content of the comments | ||||||||||
|
# 1.3 Enquire about the evaluation details
Find out the details of an evaluation.
# How to request
GET
# Request URL
https://api.weixin.qq.com/wxaapi/comment/commentinfo/get
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/commentinfo/get?commentId=123456&access_token=xxxxxx
Sample query parameters
{
commentId: '123456',
access_token: 'xxxxxx'
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
# Return the example correctly
{
info: {
content: {
commentId: '123',
createTime: '1669031402',
userInfo: { openid: 'xxx', headImg: '', nickName: '啊哈' },
content: {
txt: '突突突突突突有',
media: [
{
video:
'https://xxx/xx',
videoCover: 'http://xxx/xx',
videoDuration: 11
}
]
},
bizInfo: {
appid: "wx1234567890",
headImg: "http://wx.qlogo.cn/mmhead/xxxxxx",
nickName: "xxx的小商店"
},
score: 200, // 评价分数、星级,这里200分对应2星
orderId: 'payorder@xxxx',
wxPayId: 'xxxx',
orderInfo: {
busiOrderId: 'xxxxxx'
},
productInfo: {
productList: [{
name: "我是描述",
picUrl: "https://xxxxx/x"
}]
},
payTime: '1669030760',
amount: 1,
}
},
processInfo: { // 订单处理进度数据
commentId: 'xxx',
actionList: [
{
type: 1,
updateTime: 1669031402,
},
{ type: 2 },
{ type: 3 }
]
},
oldComment: {
commentId: 'xxx',
content: {},
score: 100,
createTime: 11111
},
}
# Return the meaning of the parameter
Return specific parameters
parameter | type | Introductions |
---|---|---|
info | Object | Information on the evaluation |
processNnfo | Object | Information on the progress bar (only bad reviews will be available) |
oldComment | Object | Information on older evaluations (only new evaluations that have been revised) |
Specific information in the info
attribute | type | Introductions | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content | Object | The evaluation was as follows | ||||||||||||||||||||||||||||||||||||||||
|
Specific parameters of bizInfo
parameter | type | Introductions |
---|---|---|
appid | String | Weixin Mini Program AppID |
headImg | String | Weixin Mini Program |
nickName | String | Nickname for Weixin Mini Program |
Specific parameters of userInfo
parameter | type | Introductions |
---|---|---|
openid | String | Rating User openid |
headImg | String | Rate the user's profile picture |
nickName | String | The nickname of the user who rated |
Specific parameters of orderInfo
parameter | type | Introductions |
---|---|---|
busiOrderId | String | Merchant number: An order number within the merchant system, which can only be a number, uppercase and lowercase letters_- * and unique under the same merchant number;Is out_trade_no in the WeChat payment interface document |
Specific parameters of info.content.content
parameter | type | Introductions |
---|---|---|
media | Array< Object > | Evaluate media documents such as images, videos |
txt | String | Contents of the evaluation |
Specific parameters of productInfo
parameter | type | Introductions |
---|---|---|
productList | Array< Object > | List of Products |
productList.name | String | Trade name |
productList.picUrl | String | Links to Products |
Specific parameters of processInfo progress
parameter | type | Introductions |
---|---|---|
actionList | Array< actionListItem > | The specific state of progress, the array type, from the end of the array to the number of updateTime is the current state |
commentId | String | Evaluation id corresponding to evaluation progress |
ActionListItem (each element in processInfo.actionList) Specific parameters
attribute | type | Introductions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
processInfo.actionList | Object | The evaluation was as follows | ||||||||||
|
Specific parameters for oldComment
attribute | type | Introductions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
commentId | String | Evaluation id | ||||||||||
createTime | String | Creation time, in seconds | ||||||||||
score | Number | The score of the user's evaluation is 1 score and 1 star for every 100 | ||||||||||
content | Object | The content of the comments | ||||||||||
|
# 2 Comments
The first response created by a developer is currently defined as a comment.
# 2.1 Create a Comment
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/reply/add
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/reply/add?access_token=xxxx
The query parameters include
{
access_token: 'xxxx' // 登录凭证
}
Body parameters include
{
commentId: "xxxxxxxxxx",
content: "我是内容"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
content | String | yes | The content of the comments |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
errmsg | String | Error message |
# 2.2 Delete Comments
The first response created by a developer is currently defined as a comment, and if that comment is removed, all responses based on that comment are deleted together.
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/reply/delete
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/reply/delete?access_token=xxxx
The query parameters include
{
access_token: 'xxxx'
}
Body parameters include
{
commentId: "xxxxxxxxxx",
replyId: "xxxxx"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
replyId | String | yes | The id of the comment |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
errmsg | String | Error message |
# 3 / Reply
# 3.1 Create a Reply
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/commentreply/add
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/commentreply/add?access_token=xxxx
The query parameters include
{
access_token: 'xxxx'
}
Body parameters include
{
commentId: "xxxxxxxxxx",
replyId: "xxxxx",
content: "我是内容"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions | |
---|---|---|---|---|
commentId | String | yes | Evaluation id | |
replyId | String | yes | The id of the comment | |
content | String | yes | Reply to the content of the comment |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
errmsg | String | Error message |
# 3.2 Delete reply
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/commentreply/delete
# Sample Request Parameters: Javascript
http://api.weixin.qq.com/wxaapi/comment/commentreply/delete?access_token=xxxx
The query parameters include
{
access_token: 'xxxx'
}
Body parameters include
{
commentId: "xxxxxxxxxx",
replyId: "xxxxx",
commentReplyId: "xxxxx"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
replyId | String | yes | The id of the comment |
commentReplyId | String | yes | Reply to comment id |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
errmsg | String | Error message |
# 4 Ratings customer service sessions
Using Weixin Mini Program customer service messaging capabilitiesFor developers of , in response to user bad reviews, the platform provides a "bad review customer service session" capability, which developers can use to actively send a customer service message to bad review users;When the user replies, the developer can continue to communicate with the user using the customer service messaging capability.
How to use it:
- Users initiate bad reviews 2.WeChat The server will push a callback request to notify the developer, see [4.1 Bad Review Notification CallBack] () 3.Developers can choose to call the API to reset customer quota, see [4.2 Reset API customer quota] () 4.Once you reset the customer quota, you can use Weixin Mini Program customer service api capabilities to send customer service messages
# 4.1 Negative Review Notice CallBack
# How to request
POST
# Request URL
Developers in WeChat open platform configuration callback server address
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
ToUserName | string | yes | Merchant Weixin Mini Program Name |
FromUserName | string | yes | WeChat OpenID for teams (fixed value) |
CreateTime | number | yes | Time of Event, Unix Timestamp |
MsgType | string | yes | Message type, fixed as event |
Event | string | yes | Event type, fixed to wxa_comment_bad_score |
result | object | yes | Resulting objects |
result.comment_id | string | yes | Evaluation ID |
# Example Requests
<xml>
<ToUserName><![CDATA[gh_abcdefg]]></ToUserName>
<FromUserName><![CDATA[oABCD]]></FromUserName>
<CreateTime>1704038400</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[wxa_comment_bad_score]]></Event>
<result>
<comment_id>2272502024443330610</comment_id>
</result>
</xml>
# Return the example correctly
{
errcode: 0,
success: true
}
# 4.2 Reset the API quota
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/apikfquota/reset
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/apikfquota/reset?access_token=xxxx
The query parameters include
{
access_token: 'xxxx'
}
Body parameters include
{
commentId: "xxxxxxxxxx"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
# 5. Acknowledgement of the settlement
# How to request
POST
# Request URL
https://api.weixin.qq.com/wxaapi/comment/confirmcompromise
# Sample Request Parameters: Javascript
https://api.weixin.qq.com/wxaapi/comment/confirmcompromise?access_token=xxxx
The query parameters include
{
"access_token": 'xxxx'
}
Body parameters include
{
commentId: "xxxxxxxxxx",
picList: ['mediaid', 'mediaid'],
content: "我是和解的内容"
}
# The meaning of the request parameter
parameter | type | Required to fill in | Introductions |
---|---|---|---|
commentId | String | yes | Evaluation id |
picList | Array< String > | no | Reconciliation of the picture mediaId collection, can refer to this https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html |
content | String | no | Text content of the settlement |
# Return the example correctly
{
errcode: 0,
success: true
}
# Return the meaning of the parameter
parameter | type | Introductions |
---|---|---|
errcode | Number | Requested status code |
success | Boolean | Whether the request is successful status |
errmsg | String | Error message |
# ERRORCODE
value | Introductions |
---|---|
-10007 | Call the interface without permission |
-10008 | Service exception |
-10001 | Parameter Exception |
-10003 | Parameters don't match |
-10403 | Do not have permission to operate this review / comment / response |
10000 | Settlement: Not bad reviews / sent template messages; Other: Parameter anomalies |