post https://api.reviews.io/webhook/add
Creates a new webhook. The webhook will trigger when a review is submitted with a POST request containing the following body:
{
'id' : '(our unique identifer for the review)',
'review_type' : '(company or product)',
'order_id' : '(your reference for the reviewers purchase)',
'rating' : '(1 to 5 star rating)',
'comments' : '(review text)',
'user' : {
'name' : '(reviewers name)',
'email_address' : '(reviewers email address)'
},
'product' : {
'sku' : '(sku of product being reviewed, only included for product reviews)'
}
}
The ID returned by this endpoint can later be used to remove the webhook using the Remove a review submitted Webhook endpoint.
Webhooks can also be created as part of an Invitation Flow in the REVIEWS.io dashboard.
Additional data can be requested using the includes parameter which expects a comma separated list, the following values are accepted :-
Includes | Description |
---|---|
attribute_customer | attribute data stored for the user |
attribute_company | store_review attribute data |
attribute_product | product_review attribute data |
tags | tags included against the review |
product | full details stored for the product for a product_review |
user | general stats are generated for the user |
photo | photos on the review appended with our asset url, includes active and inactive status |
video | videos on the review appended with our asset url, includes active and inactive status |