API Integration

Welcome to the Nearby Now API Integration Page

If you wish to integrate your website with server-side code, here are some instructions that may help.

CSS and Script Files

jQuery 1.6 or later is required. We recommend using a CDN to serve-up jQuery. For example, to use Google’s jQuery CDN:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

The following css files and script files will need to be loaded for pages utilizing the Nearby Now API content:
Note, these must come after jQuery has been loaded

<link href="https://d2gwjd5chbpgug.cloudfront.net/v3/css/nnplugin.min.css" rel="stylesheet" type="text/css" />
<script src="https://d2gwjd5chbpgug.cloudfront.net/v3/scripts/heatmap.min.js"></script>

 

API Endpoints

The Nearby Now API supports multiple content modes, each with the following endpoints:

Recent Reviews https://api.sidebox.com/plugin/nearbyreviews
Service Area Map & Recent Check-ins https://api.sidebox.com/plugin/nearbyservicearea
Service Area Review Combo https://api.sidebox.com/plugin/nearbyserviceareareviewcombo
Audio Testimonials (new) https://api.sidebox.com/plugin/testimonials
Photo Gallery (new) https://api.sidebox.com/plugin/photogallery

Parameters

All three API endpoints support a common set of parameters, with the following exceptions: the combination endpoint uses “reviewcount”, “reviewstart”, “checkincount”, and “checkinstart”, where the other two urls simply use “count” and “start”. It also includes a few additional parameters as described below. The storefronttoken parameter is a unique identifier that you can find under the API tab in the settings page of the admin site.

/nearbyserviceareareviewcombo

  • state="FL" – Optional & case insensitive. Must be used in conjunction with “city”. Indicates the city and state for which the review and check-in content will be rendered in the markup, and where the map will be centered. If no city and state are specified, review and check-in content will be rendered without respect to its local city/state, and the map center will be calculated based on an approximate center of all reviews.
  • city="Orlando" – Optional & case insensitive. Must be used in conjunction with “state” (See above). Can be a comma separated list of city names
  • showmap="yes" – Optional, defaults to “yes”. If specified as anything other than “yes”, then the map will not be displayed, and only the rendered review and check-in content will be shown.
  • reviewstart="1" – Optional, defaults to “1”. Indicates the starting review number to render, based on a reverse chronological order, and may be used for paging.
  • reviewcount="15" – Optional, defaults to 15. Specifies the number of reviews to render based on a reverse chronological order.
  • checkinstart="1" – Optional, defaults to “1”. Indicates the starting check-in number to render, based on a reverse chronological order, and may be used for paging.
  • checkincount="25" – Optional, defaults to 25. Specifies the number of check-ins to render based on a reverse chronological order.
  • zoomlevel="11" – Optional. Indicates the initial zoom level of the map, and may be a number between 8 and 14, where 8 is a larger area with less detail, and 14 is a small area with more detail. If not specified, Nearby Now will calculate an appropriate zoom level.
  • reviewcityurl="http://www.mydomain.com/service-area-{city}-{state}" – Optional. If specified, a set of url’s will be rendered under the title “Our Reviews by City”. Each city that has at least one local review will be rendered as a link that fits the specified pattern, where “{city}” will be replaced by the lowercase name of the city, and “{state}” will be replaced by the lowercase two character abbreviation for the state. If a city name has more than one word, hyphens will replace the spaces. In the example above, the url rendered for Fort Worth, Texas will be “http://www.mydomain.com/service-area-fort-worth-tx”.
  • mapsize="large" – Optional, defaults to “large”. May be “small” to render a small map, “medium” for a bigger map, and “large” for a large map. The containing element of the shortcode dictates the width of the map – this parameter adjusts the height.
  • mapscrollwheel="no" – Optional, defaults to “no”. If specified as “yes”, then the mouse scroll wheel may be used to change the zoom level of the interactive map.
  • fblike="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook like button plugin will be rendered below each rendered review.
  • fbcomment="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook comment plugin will be rendered below each rendered review.
  • techemail="tech@yourdomain.com" – Optional. If specified, the rendered reviews and check-ins will be limited to those of the technician specified. This is often used for technician specific pages, where each technician has his or her own page of reviews and check-in content. Consider using in conjunction with showmap=”no”, and without a city or state parameter.
  • serviceareaname – Optional, defaults to the name of the city(s) from the city param. If combining multiple cities you might say something like “East Valley”.
  • referrer – Address of the webpage that linked to the resource being requested.
  • hosturl – The full address of current request.
  • showphotos="yes" – Optional, defaults to “yes”. If specified as “no”, plugin output will not include checkin photos.
  • showminimap="yes" – Optional, defaults to “yes”. If specified as “no”, plugin output will not a statis Google Maps image next to a review.

/nearbyservicearea

  • state="FL" – Optional & case insensitive. Must be used in conjunction with “city”. Indicates the city and state for which the check-ins will be rendered in the markup, and where the map will be centered. If no city and state are specified, check-ins will be rendered without respect to the check-in local city/state, and the map center will be calculated based on an approximate center of all check-ins.
  • city="Orlando" – Optional & case insensitive. Must be used in conjunction with “state” (See above). Can be a comma separated list of city names
  • showmap="yes" – Optional, defaults to “yes”. If specified as anything other than “yes”, then the map will not be displayed, and only the rendered check-ins will be shown.
  • start="1" – Optional, defaults to “1”. Indicates the starting check-in number to render, based on a reverse chronological order, and may be used for paging.
  • count="15" – Optional, defaults to 15. Specifies the number of check-ins to render based on a reverse chronological order.
  • zoomlevel="11" – Optional. Indicates the initial zoom level of the map, and may be a number between 8 and 14, where 8 is a larger area with less detail, and 14 is a small area with more detail. If not specified, Nearby Now will calculate an appropriate zoom level.
  • mapscrollwheel="no" – Optional, defaults to “no”. If specified as “yes”, then the mouse scroll wheel may be used to change the zoom level of the interactive map.
  • fblike="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook like button plugin will be rendered below each rendered check-in.
  • fbcomment="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook comment plugin will be rendered below each rendered check-in.
  • techemail="tech@yourdomain.com" – Optional. If specified, the rendered check-ins will be limited to those of the technician specified. This is often used for technician specific pages, where each technician has his or her own page of check-in content. Consider using in conjunction with showmap=”no”, and without a city or state parameter.
  • referrer – Address of the webpage that linked to the resource being requested.
  • hosturl – The full address of current request.
  • showphotos="yes" – Optional, defaults to “yes”. If specified as “no”, plugin output will not include checkin photos.

/nearbyreviews

  • state="FL" – Optional & case insensitive. Must be used in conjunction with “city”. Indicates the city and state for which the reviews will be rendered in the markup, and where the map will be centered. If no city and state are specified, reviews will be rendered without respect to the author’s local city/state, and the map center will be calculated based on an approximate center of all reviews.
  • city="Orlando" – Optional & case insensitive. Must be used in conjunction with “state” (See above). Can be a comma separated list of city names
  • showmap="yes" – Optional, defaults to “yes”. If specified as anything other than “yes”, then the map will not be displayed, and only the rendered reviews will be shown.
  • start="1" – Optional, defaults to “1”. Indicates the starting review number to render, based on a reverse chronological order, and may be used for paging.
  • count="15" – Optional, defaults to 15. Specifies the number of reviews to render based on a reverse chronological order.
  • zoomlevel="11" – Optional. Indicates the initial zoom level of the map, and may be a number between 8 and 14, where 8 is a larger area with less detail, and 14 is a small area with more detail. If not specified, Nearby Now will calculate an appropriate zoom level.
  • mapscrollwheel="no" – Optional, defaults to “no”. If specified as “yes”, then the mouse scroll wheel may be used to change the zoom level of the interactive map.
  • fblike="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook like button plugin will be rendered below each rendered review.
  • fbcomment="no" – Optional, defaults to “no”. If specified as “yes”, a Facebook comment plugin will be rendered below each rendered review.
  • techemail="tech@yourdomain.com" – Optional. If specified, the rendered reviews will be limited to those of the technician specified. This is often used for technician specific pages, where each technician has his or her own page of review content. Consider using in conjunction with showmap=”no”, and without a city or state parameter.
  • referrer – Address of the webpage that linked to the resource being requested.
  • hosturl – The full address of current request.
  • showminimap="yes" – Optional, defaults to “yes”. If specified as “no”, plugin output will not a statis Google Maps image next to a review.

/testimonials

  • playlist="play_list_name" – Required & case insensitive. The name of the play list that you want to display on the page.
  • showTranscription="true" – Optional. If you’ve had audio testimonials transcribed, set this option to true to have the text display along with the audio.
  • start="1" – Optional, defaults to “1”. Indicates the starting audio testimonial number to render, based on a reverse chronological order, and may be used for paging.
  • count="15" – Optional, defaults to 15. Specifies the number of audio testimonial to render based on a reverse chronological order.

/photogallery

  • start="1" – Optional, defaults to “1”. Indicates the starting photo number to render, based on a reverse chronological order, and may be used for paging.
  • count="10" – Optional, defaults to 10. Specifies the number of photos to render based on a reverse chronological order.

 

Example PHP Code

Place the following code wherever you need to render the API content:

Example C# ASP.NET MVC Code

Use the following code in your controller to retrieve the API content:
Looking for an ASP.NET Web Forms example? https://github.com/NearbyNow/NearbyNow-aspnetwebformexample

Example Ruby Code for Rails/Sinatra

Use the following code in your controller/model/helper-class to retrieve the API content:

Javascript Reviews Widget

Looking for our embed-able Javascript Reviews Widget? You can find that here.

Photo Gallery Widget

Looking for our embed-able Javascript Photo Gallery Widget? You can find that here.

Random Recent Reviews (BETA)

Looking to build a Javascript slider and need a JSON endpoint to fill it with random review data? You can find that here.

Responsive Design for custom implementations

The following is an example of making the Nearby Now plugin content mobile friendly. Keep in mind that this is a generic example and you should use CSS that adheres to your own site responsive guidelines:

Google Maps API

Your website may be required to obtain a Google Maps API Key in order to render maps on your web pages. The Google Maps API Key should be saved to your storefront. Here’s how to obtain a Google Maps API Key:

  1. Login to https://console.developers.google.com/apis/ – you will need to create a free Google account if you do not already have one.
  2. Navigate to the API Manager: https://console.developers.google.com/apis/library
  3. From The Google APIs tab, setup the following Google APIs: Google Maps JavaScript API and Google Static Maps API. Click into each one and then click the blue “Enabled” button.
  4. Once you have enabled the two APIs, click on “credentials:”
  5. Click on the blue “Create Credentials” button. Give the credentials a name you will remember, such as the company name, or Company and Nearby Now Maps.
  6. Record the generated Key. This is what you’ll save in your Storefront.

To save the Google Maps API Key to your storefront go to Settings > Company Profile > Google Maps API Key.

Write API

We have multiple endpoints that enable you to create checkins and generate review requests from your own systems.

Checkin API

The Checkin API allows agencies and clients to generate new checkins from their own systems. Learn More

Review Request API

We also have a Review Request API that allows agencies and clients to generate new survey requests on behalf of their customers. Learn More

Latest Blog Posts

Contact