Reviews API - How to Edit Reviews Data with API Calls
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000097913
The API allows getting, creating, updating, deleting and searching reviews on the website. However, only one widget can be updated at a time.
Available Endpoints
Below is a list of the available endpoints for the Reviews:
- https://example.com/api/v2/users_reviews/get/{id}
- https://example.com/api/v2/users_reviews/create
- https://example.com/api/v2/users_reviews/update
- https://example.com/api/v2/users_reviews/delete/{id}
- https://example.com/api/v2/users_reviews/search
Get a Review
Read the data of a single user review based on the review_id.
Endpoint
GET https://example.com/api/v2/user_reviews/get/{id} curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/user_reviews/get/{id}"
Example Request:
GET https://example.com/api/v2/users_reviews/get?property=review_id&property_value=39
Query Parameters:
property | The property key (eg., review_id). |
property_value | The value associated with the property. |
Example Response:
{ "status": "success", "message": [ { "review_id": "43", "user_id": "2", "review_title": "Great person to work with", "review_description": "<p>I had a wonderful experience working with this company. </p>", "review_worked": "", "service_id": "0", "review_name": "Jake Umbrella", "review_email": "[email protected]", "review_added": "20250227154004", "review_approved": "", "ip": "200.189.18.127", "cookie": "", "httpr": "california/los-angeles/top-level-category/sample-member-2/writeareview", "member_id": "21", "review_token": "432e8e7d5346b37a420bf3a7b3a62752", "review_updated": "20250227154004", "rating_overall": "5", "rating_service": "5", "rating_response": "5", "rating_expertise": "5", "rating_results": "5", "rating_language": "5", "revision_timestamp": "2025-02-27 16:42:20", "formname": "member_review", "url_origin_pars": "/california/los-angeles/top-level-category/sample-member-2/writeareview" } ], "total": 1, "current_page": 1 }
Create a Review
Add a new user review to the database.
Parameter Notes: The user_id and review_title are required for the API to create the review. When using Postman, select the 'Body' tab, choose 'form-data', and enter the parameters.
Endpoint:
POST https://example.com/api/v2/users_reviews/create curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/users_reviews/create"
Example Request:
{ "user_id": "2", "review_title": "Excellent Restaurant", "review_description": "What makes this restaurant stand out is its versatility. Whether you're craving comfort food like a juicy, plant-based burger with crispy sweet potato fries or something light and refreshing like a quinoa and avocado salad, they have it all.", "rating_overall": "5", "rating_service": "5", "rating_response": "5", "rating_expertise": "5", "review_images": "https:\/\/images.pexels.com\/photos\/4374579\/pexels-photo-4374579.jpeg,https:\/\/images.pexels.com\/photos\/6541578\/pexels-photo-6541578.jpeg", "send_review_email": "1", "review_email": "[email protected]", "review_name": "Anita", "rating_results": "5", "auto_import_review_image": "1" }
Query Parameters:
user_id | The ID of the member receiving the review. |
review_title | The title of the review. |
review_description: | The content of the review |
send_review_email | Notifies the member. Set the value to 1 to send an email notification. |
rating_overall | Use values 1-5, where 1 means Very Poor and 5 means Excellent. |
rating_service | Use values 1-5. |
rating_response | Use values 1-5. |
rating_expertise | Use values 1-5. |
rating_results | Use values 1-5. |
review_email | The email address of the reviewer. |
review_name | The name of the reviewer submitting the review. |
review_images | URLs of images related to the review. Separate multiple URLs with commas. |
auto_import_review_image | Automatically import an image for the review. Set the value to 1. |
Example Response:
{ "status": "success", "message": { "review_id": "46", "user_id": "2", "review_title": "Excellent Restaurant", "review_description": "What makes this restaurant stand out is its versatility. Whether you're craving comfort food like a juicy, plant-based burger with crispy sweet potato fries or something light and refreshing like a quinoa and avocado salad, they have it all.", "service_id": "0", "review_name": "Anita", "review_email": "[email protected]", "review_status": "0", "review_added": "20250227223422", "ip": "54.86.50.139", "httpr": "united-states-of-america/los-angeles/top-level-category/sample-member-2", "member_id": "0", "review_token": "670f38aff12bb1922d4b142e9719dad4", "review_updated": "20250227223422", "rating_overall": "5", "rating_service": "5", "rating_response": "5", "rating_expertise": "5", "rating_results": "5", "spoken_language": "1", "rating_language": "5", "review_images": "https://images.pexels.com/photos/4374579/pexels-photo-4374579.jpeg,https://images.pexels.com/photos/6541578/pexels-photo-6541578.jpeg", "send_review_email": "1", "auto_import_review_image": "1", "user_schema": { "user_id": "2", "first_name": "Sample", "last_name": "Member 2", "email": "[email protected]", "company": "Sample Member Inc.", "phone_number": "555-555-5555", "about_me": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit....</p>", "featured": "0", "modtime": "2025-02-27 17:09:44", "subscription_id": "1" }, "users_portfolio_schema": [ { "photo_id": "8", "user_id": "2", "file": "aphoto-8.jpeg", "photo_token": "e7ee09b6871303cd66c5033a6fac5ab4", "photo_date_added": "20250227223428", "image_imported": "2" }, { "photo_id": "9", "user_id": "2" } ] } }
Update a Review
Update a user review record and its related data in the database.
Parameter Notes: Use review_id to update the review content.
Endpoint:
PUT https://example.com/api/v2/users_reviews/update curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/users_reviews/update"
Example Request:
{ "user_id": "2", "review_title": "It's no surprise it has 3 Michelin stars!", "review_id": "46", }
Query Parameters:
review_id | The ID of the review. |
Example Response:
{ "status": "success", "message": { "review_id": "46", "user_id": "2", "review_title": "It's no surprise it has 3 Michelin stars!", "review_description": "What makes this restaurant stand out is its versatility. Whether you're craving comfort food like a juicy, plant-based burger with crispy sweet potato fries or something light and refreshing like a quinoa and avocado salad, they have it all.", "service_id": "0", "review_name": "Anita", "review_email": "[email protected]", "review_status": "0", "review_added": "20250227223422", "ip": "54.86.50.139", "httpr": "united-states-of-america/los-angeles/top-level-category/sample-member-2", "member_id": "0", "review_token": "670f38aff12bb1922d4b142e9719dad4", "review_updated": "20250227223422", "rating_overall": "5", "rating_service": "5", "rating_response": "5", "rating_expertise": "5", "rating_results": "5", "spoken_language": "1", "rating_language": "5", "recommend": "0", "revision_timestamp": "2025-02-27 22:34:22", "formname": "member_review", "user_schema": { "user_id": "2", "first_name": "Sample", "last_name": "Member 2", "email": "[email protected]", "company": "Sample Member Inc.", "phone_number": "555-555-5555", "address1": "123 S Main St", "city": "Los Angeles", "zip_code": "90012", "state_code": "CA", "state_ln": "California", "country_code": "US", "country_ln": "United States Of America", "website": "http%3A%2F%2Fwww.mywebsite.com", "twitter": "http%3A%2F%2Fwww.twitter.com%2Ftwitter", "facebook": "http%3A%2F%2Fwww.facebook.com", "linkedin": "http%3A%2F%2Fwww.linkedin.com", "quote": "This is a sample listing. Think of the possibilities!", "experience": "2006", "affiliation": "Cash\rVisa\rMastercard\rAmerican Express", "awards": "2022 Biggest Smile Award\r2022 Best Customer Service", "about_me": "<p>Lorem ipsum dolor sit amet...</p>", "featured": "0", "modtime": "2025-02-27 17:09:44", "subscription_id": "1", "filename": "united-states-of-america/los-angeles/top-level-category/sample-member-2", "password": "$2a$11$28a5d0f12b0ea67767ad3u6x8ACx/uYv6Hw6wOekvj37yqhreyAB2", "active": "2", "token": "bc93bdc6e1467d9cc28e2b14259f5d41", "ref_code": "Manually Added", "signup_date": "20150704164637", "cookie": "f5945dfe74212cffc1c1be1d5d272bb8", "last_login": "20210908005032", "position": "Co-Founder", "instagram": "http%3A%2F%2Fwww.instagram.com", "credentials": "Certified Happiness Expert\rProfessional Problem Solver", "bitly": "0", "profession_id": "1", "verified": "0", "nationwide": "0", "listing_type": "Individual", "lat": "34.05203440", "lon": "-118.24387620", "parent_id": "0" }, "users_portfolio_schema": [ { "photo_id": "8", "user_id": "2", "file": "aphoto-8.jpeg", "photo_token": "e7ee09b6871303cd66c5033a6fac5ab4", "photo_date_added": "20250227223428", "status": "1", "order": "1", "image_imported": "2" }, { "photo_id": "9", "user_id": "2", "file": "aphoto-9.jpeg", "photo_token": "6874e29211983fcf0a9135b42cb6d50e", "photo_date_added": "20250227223428", "status": "1", "order": "0", "image_imported": "2" } ] } }
Delete a Review
Search Reviews and their related data from the database.
Parameter Notes: Use review_id to delete the review.
Endpoint:
DELETE https://example.com/api/v2/user_reviews/delete curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/user_reviews/delete"
Example Request:
{ "review_id": "2", }
Query Parameters:
review_id | The ID of the review. |
Example Response:
{ "status": "success", "message": "users_reviews record was deleted" }
Search a Review
Search Reviews and their related data from the database.
Parameter Notes: Use review_id to search for the review.
Endpoint:
POST https://example.com/api/v2/users_reviews/search curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/users_reviews/search"
Example Request:
{ "review_id": "39", }
Query Parameters:
review_id | The ID of the review. |
Example Response:
{ "status": "success", "message": "<hr> <div class=\"module search_result\">\r\n <div class=\"col-md-3 xs-text-center\">\r\n <a href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella\"><img class=\"img-rounded xs-bmargin review_photo\" src=\"/images/default-photo.webp\"></a>\r\n </div>\r\n <div class=\"col-md-9 xs-text-center\">\r\n <a class=\"h3 bold\" href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella\">Jake Umbrella</a>\r\n <h3 class=\"bold tmargin\"><a href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella/reviews/41\">A truly great person</a></h3>\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <ul class=\"list-unstyled nomargin\">\r\n <li>\r\n <p class=\"bold pull-left\">Overall Rating</p>\r\n <div class=\"star_rating pull-right\">\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <p>Greatness!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>\r\n <div class=\"nopad pull-left recent-member-image\" style=\"width: 35px;height: 35px;margin-right: 5px;\">\r\n <img class=\"img-rounded lazyloader\" loading=\"lazy\" width=\"35\" height=\"35\" alt=\"Admin User - Blog Author\" src=\"/images/default-photo.webp\" style=\"display: inline-block;\">\r\n </div>\r\n <p class=\"small tmargin\" style=\"line-height: 35px;\">\r\n Submitted by Admin User - Blog Author on 02/18/2025 </p>\r\n \r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n <div class=\"module search_result\">\r\n <div class=\"col-md-3 xs-text-center\">\r\n <a href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella\"><img class=\"img-rounded xs-bmargin review_photo\" src=\"/images/default-photo.webp\"></a>\r\n </div>\r\n <div class=\"col-md-9 xs-text-center\">\r\n <a class=\"h3 bold\" href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella\">Jake Umbrella</a>\r\n <h3 class=\"bold tmargin\"><a href=\"/côte-d-ivoire/abidjan/top-level-category/jake-umbrella/reviews/40\">Wonderful</a></h3>\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <ul class=\"list-unstyled nomargin\">\r\n <li>\r\n <p class=\"bold pull-left\">Overall Rating</p>\r\n <div class=\"star_rating pull-right\">\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <p>she is wonderful</p>\r\n <p class=\"small tmargin\" style=\"line-height: 35px;\">\r\n Submitted by Coffee on 02/06/2025 </p>\r\n \r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n <div class=\"module search_result\">\r\n <div class=\"col-md-3 xs-text-center\">\r\n <a href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-2\"><img class=\"img-rounded xs-bmargin review_photo\" src=\"/images/default-photo.webp\"></a>\r\n </div>\r\n <div class=\"col-md-9 xs-text-center\">\r\n <a class=\"h3 bold\" href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-2\">Sample Member 2</a>\r\n <h3 class=\"bold tmargin\"><a href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-2/reviews/38\">Great person to work with</a></h3>\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <ul class=\"list-unstyled nomargin\">\r\n <li>\r\n <p class=\"bold pull-left\">Overall Rating</p>\r\n <div class=\"star_rating pull-right\">\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <p>I had a wonderful experience working with this company. They were very professional and I would recommend them to my friends and family. They were on time, responsive and completed the job within budget. I'm very pleased that I went with this company. </p>\r\n <p class=\"small tmargin\" style=\"line-height: 35px;\">\r\n Submitted by Sample Reveiwer on 08/13/2024 </p>\r\n \r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n <div class=\"module search_result\">\r\n <div class=\"col-md-3 xs-text-center\">\r\n <a href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-3\"><img class=\"img-rounded xs-bmargin review_photo\" src=\"/images/default-photo.webp\"></a>\r\n </div>\r\n <div class=\"col-md-9 xs-text-center\">\r\n <a class=\"h3 bold\" href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-3\">Sample Member 3</a>\r\n <h3 class=\"bold tmargin\"><a href=\"/united-states-of-america/los-angeles/top-level-category/sample-member-3/reviews/39\">Great person to work with</a></h3>\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <ul class=\"list-unstyled nomargin\">\r\n <li>\r\n <p class=\"bold pull-left\">Overall Rating</p>\r\n <div class=\"star_rating pull-right\">\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n <i class=\"fa fa-star\"></i>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <p>I had a wonderful experience working with this company. They were very professional and I would recommend them to my friends and family. They were on time, responsive and completed the job within budget. I'm very pleased that I went with this company. </p>\r\n <p class=\"small tmargin\" style=\"line-height: 35px;\">\r\n Submitted by Sample Reveiwer on 08/13/2024 </p>\r\n \r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n", "total_reviews": "4", "total_pages": 1 }