Reviews API - How to Edit Reviews Data with API Calls
When updating a reviews using the api, only one review can be updated at a time.
Using the API there are 4 reviews actions that can be achieved:
- api/v2/users_reviews/get/{id}
- api/v2/users_reviews /create
- api/v2/users_reviews /update
- api/v2/users_reviews /delete/{id}
We will break down these actions and explain how to achieve an end results with each one. The examples shown in this article are completed using https://www.postman.com/
For all actions, add the API Key to the Headers:
1. api/v2/users_reviews/get/{id}
Using this action is simple, add the url above but replace {id} with the actual review ID. This will fetch the review's information from the website.
- Choose GET as the method
- Replace the {{api_url}} for the website url
- Replace the {id} with the actial review ID
2. api/v2/users_reviews/create
To use this action it should have the same variables found within the Listing - Write Review form.
The user_id and review_title are required for the api to create the review.
There's one additional variable that can be added for the member to get notified, which is the send_review_email. Set the value to 1 to send the email notification.
- Choose POST as the method
- In the Body select form-data
- Then add the variables
3. api/v2/users_reviews/update
With this action, within the spreadsheet add the review_id and the variables for the information the needs to be updated.
- Choose PUT as the method.
- In the Body select x-www-form-urlencoded
- Then add the variables that will be updated
4. api/v2/users_reviews/delete/{id}
Use this action URL to delete a review, replace {id} with the review ID that will be removed from the website.
- Choose DELETE as the method
- Replace the {id} with the review_id that will be deleted
- In the Params add the review_id to delete