Reviews - n49/N49-Data-Api-Documentation GitHub Wiki

#REVIEWS

NOTE: Any reproduction of reviews accessed by this API is strictly forbidden. This rule can be ignored under very specific situations with written permission by n49.ca

##Request

Properties

Property Value
Method GET
URL http://data-api.n49.ca/businesses/reviews
Name Required? Description Example
api_key Yes The API Key Provided by n49
bID Yes The listing bID on n49 888303
num No The number of reviews to return 10
before No An ISO-8601 date-time that filters results to those reviews posted before this time (exclusive). If not specified, no filter is applied. 2012-09-16T13:15:53Z
property No The name of the property to return reviews from. If not specified, reviews from all properties will be returned. n49
pagination No The number of reviews to be returned per page. Using pagination helps speed up queries for businesses with a large quantity of reviews. 20
page No The page number of the response. With pagination set to 20 a page value of 1 would return reviews 1 through 20, page 2 would return reviews 21 through 40. 1

Note: Properties currently available are n49, gopro, autostars, celebrate, and reviewmanager. reviewmanager filters reviews that have been assigned to the businesses website specifically

##Response

Status Codes

Status Code Condition
200 OK Successfully returned the specified reviews.
400 BAD REQUEST You sent a malformed request.
404 NOT FOUND The requested Listing does not exist.
5xx SERVER ERROR Temporary error -- You should try again later Server outage, etc.

##Body

The response body is a JSON document containing a list of reviews in reverse chronological order (i.e., newest first).

Name Type Description
total Integer Total number of reviews on the listing, overall. This might be larger than the number of reviews returned.
rating Float The average rating across all reviews for this listing
maxRating Integer The maximum possible rating (e.g., 5)
reviews List of Reviews A list of num Review objects, respecting the filter specified in before and sorted in reverse chronological order