Endpoint
https://api.cms-tool.net/api/comments
Description
Comments API is also product reviews, blog comments, forums, chat and noticeboards.
Comments are linked to a member who posted the comment, and attached primarily to a page. They may also be attached to other objects like products, blogs, and other comments, in a threaded discussion
Parameters
| Name | Description | Example | Optional | Data type |
| data | The JSON you would like to POST. This can be POST content also |
{
}
|
Yes | json object |
| id | Search a specific comment by it's id | id=123 | Yes | int |
|
mbr_id |
The member who has commented |
mbr_id=111 |
Yes | int |
|
msg_show |
Filter comments which are marked to show |
msg_show = "yes" |
Yes | string |
|
postedAfter |
Filter comments which were posted before the time provided. |
postedAfter="2021-01-01" |
Yes | string |
|
postedBefore |
Filter comments which were posted before the time provided. |
postedBefore="2021-12-31" |
Yes | string |
| re_info_id | Enquiry about a specific blog's comments | re_info_id=1231234 | Yes | int |
| re_pid | Enquiry about a specifc product's reviews | re_pid=102212 | Yes | int |
| re_eventid | Enquiry about a specific event's reviews | re_eventid=12312 | Yes | int |
Create a new Comment
To create a new comment use POST method and do not provide any Comment Id.
For the comment to show up on your site include the page id (can be found from GET data). and set "msg_show": "Y"
Must include: mbr_id or msg_email.
For the review to show on your product page include the forum_pid as the product id of the product.
Example:
{
"msg_text": "Comment text",
"msg_email": "example@email.com",
"msg_title": "Comment title",
"page": 1234
}
Update an existing comment
You can also update an existing Comment. You must include id, mbr_id or msg_email. The rest of the parameters provided will be used to update the Comment.
Example:
{
"id": 12345,
"msg_text" : "The message has been updated" ...
}
Updateable Fields for Comments
page, msg_text, msg_email, msg_re, msg_posted, mbr_id, msg_title, msg_show, msg_photo, msg_group_id, msg_author, msg_notifyreplies, forum_info_id, msg_rating, forum_pid, forum_reply_count, forum_reply_last, msg_url
Example Return JSON Comment
{
"endPoint": "comments",
"resultCount": 1,
"data": {
"msg_posted": "2021-12-17 16:50:19.340045",
"forum_info_id": 0,
"msg_title": "New test review",
"msg_group_id": 0,
"mbr_id": 123123,
"forum_pid": 1111111,
"forum_reply_count": 0,
"msg_notifyreplies": "N",
"msg_email": "test@testemail.co.nz",
"msg_re": 0,
"msg_rating": 4,
"id": 123111,
"page": 1111111,
"mbr_uid": 123123,
"msg_show": "Y",
"msg_id": 123111,
"cid": 11111111
},
"success": true
}