Random Recent Review

This endpoint allows you to pull back one or many random reviews as JSON output. Useful if you want to seed a Javascript review slider, or show a different review on each page load.

Endpoint


https://api.sidebox.com/plugin/randomreviews

Parameters

  • storefronttoken : (required) The storefronttoken parameter is a unique identifier that you can find under the API tab in the settings page of the admin site
  • minstarrating: (optional) Defaults to 5
  • minsummarylength: (optional) Defaults to 30. Gives you the ability to only select recent reviews that have a summary greater than a certain length
  • mindetaillength: (optional) Defaults to 50. Gives you the ability to only select recent reviews that have a detail greater than a certain length
  • mindate: (optional) Defaults to 30 days ago. Only pull reviews that were completed greater than or equal to this date
  • City: (optional) Restrict the random reviews to this city – Note, if using City, both City & State params are required
  • State: (optional) Restrict the random reviews to this state – Note, if using State, both City & State params are required
  • Count: (optional) Defaults to 1. Control how many random reviews are returned
  • TechEmail: (optional) Restrict the random reviews to this user

Errors

The Nearby Now API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, authentication information was missing, etc.), and codes in the 5xx range indicate an error with Nearby Now’s servers.

All requests, success or failure, will return a JSON response with a Checkin Location Object and a success flag. A failed request will contain an error message string describing the problem.

Examples

Here’s an example cURL request that shows how simple it is to call the Nearby Now API, as well as an example success response:


curl https://api.sidebox.com/plugin/randomreviews?storefronttoken={client_api_token}&minstarrating=5

Example Response:

{
  "obj": "randomreviews",
  "success": true,
  "data": [
    {
      "author": "Jane D",
      "date": "3/10/2015",
      "summary": "Furnace issue on a very cold day.",
      "detail": "Your Service Tech was very professional and went to work to correct the heating issue and checked again to make sure it would continue to work properly.",
      "rating": 5,
      "state": "MO",
      "city": "Saint Charles",
      "lat": 38.789136,
      "lng": -90.511009
    }
  ]
}

Latest Blog Posts

Contact