Forum Discussion
Hi derduher,
There are a couple of other parameters you'll want to use when adding a review:
- reviews.review - This parameter should have a value of "true", to set metadata on the message to indicate that it's a review. The post will not show up in the reviews UI without this parameter set to true.
- review_ratings - You can use this parameter to give a rating along with the review
For example:
/restapi/vc/products/id/my_product_id/discussion/reply?message.subject=test+review&message.body=test+review+body&review_ratings=3&reviews.review=true
I hope this helps!
No dice. The review is still not showing up in products/id/ID/reviews.
POST /products/id/2/discussion/reply restapi.response_format=json&restapi.session_key=XXXXX&product_id=2&message.subject=amazing&message.body=asdf+dfdd+kjkjkdjfkdjfdfk+jasdf+kjkjkdfjkdjfkdjkfjdfkdj+kdd&reviews.review=true
{ "response": { "status": "success", "message": { "type": "message", "href": "/boards/id/@review/messages/id/9", "id": { "type": "int", "$": 749 }, "read_only": { "type": "boolean", "$": false }, "subject": { "type": "string", "$": "amazing" }, "deleted": { "type": "boolean", "$": false }, "author": { "type": "user", "href": "/users/id/155", "login": { "type": "string", "$": "derduher3282013" } }, "body": { "type": "string", "$": "asdf dfdd kjkjkdjfkdjfdfk jasdf kjkjkdfjkdjfkdjkfjdfkdj kdd" }, "thread": { "type": "thread", "href": "/threads/id/719" }, "board": { "type": "board", "href": "/boards/id/@review" }, "parent": { "type": "message", "href": "/messages/id/719" }, "teaser": { "type": "string", "$": "" }, "views": { "count": { "type": "int", "$": 0 } }, "root": { "type": "message", "href": "/messages/id/719" }, "board_id": { "type": "int", "$": 9 }, "post_time": { "type": "date_time", "$": "2013-04-15T20:31:25+00:00" }, "message_rating": { "type": "float", "$": 0 }, "last_edit_author": { "type": "user", "href": "/users/id/155", "login": { "type": "string", "$": "derduher3282013" } }, "kudos": { "count": { "type": "int", "$": 0 } }, "last_edit_time": { "type": "date_time", "$": "2013-04-15T20:31:25+00:00" } } } }
GET /restapi/vc/products/id/2/reviews?restapi.response_format=json
{ "response": { "status": "success", "product_review_context": { "type": "product_review_context", "count": { "type": "int", "$": 0 }, "messages": { "message": [] } } } }
- AdamN13 years agoKhoros Oracle
Hi derduher,
That's very strange. I tested the exact call that I posted above on our interal QA sites for the last two releases, and it worked fine for both release versions. I saw the review in both the UI and via the REST API. This suggests to me that perhaps there's something off about your particular community instance, perhaps an admin setting that needs to be tweaked or a back-end config that needs to be changed. I'd suggest filing a case so that our support team can assist in debugging the issue.
I did notice that you added a "product_id" parameter. Perhaps that's throwing it off? Try using the format I posted above and see if that works for you. If not, I'd definitely suggest filing a case.