Review Search API

Overview

The Review Search API allows a search of reviews utilizing query string parameters as defined below. The API will respond with JSON or XML based on the content type set in the Content-Type HTTP header. 

The results of the review search is broken into pages. Total contains the total number in the result set. The review collection contains the result in the current page. The pages can be iterated through by incrementing the PageNumber value in the request. 

The service will only return reviews that have been approved for web or for social. 

Possible Response Codes

  • 200 (OK). This response indicates the request was successfully parsed and the response body contains the search result.
  • 400 (Bad Request). Along with the 400 response, the body of the response will contain an error message describing why the request was a bad request
  • 500 (Internal Server Error). An unknown error occurred during the search

Post Information

HTTP Endpoint 

https://{baseurl}/CSI/api/ReviewSearch?manufacturercode={manufacturerCode}

Search Data Schema 

The query string parameters that are accepted in the GET request are defined below. Please note that the service requires the manufacturer code criteria to be in the endpoint URL. The service will ONLY return reviews that have been approved for web or for social. 

Field Name 
Required 
Format 
Description 
ManufacturerCode
X 
Max Length: 6
Filters the result by the given manufacturer.
BrandCode

Max Length: 50 
Filters the result by the given brand.  
ProductTypeCode

Max Length: 20 
Filters the result by the given product type.
ProductCode
 
Max Length: 50 
Filters the result by the given product code.
ProductModelYear 

Max Length: 100 
A comma delimited string list of Brand Code values. If no brand value is provided, the lead will be assigned to all of the manufacturer’s brands. 
DealerNumber

Max Length: 20
Filters the result by the given dealer number.
DealerLocation

Max Length: 10
Filters the result by the given dealer location. To use DealerLocation you must also pass DealerNumber in the parameters
SurveyFormName 

Max Length: 50
Filters the result by the survey response’s survey form’s name.
SurveyTypeCode 

Max Length: 20
Filters the result by the survey response’s survey form’s survey type.
PageNumber 

Number
The current page number. The default is 1.
PageSize 

Number
The current page size. The default is 5.
OrderBy 

Valid values are: Featured, CreateDate, PurchaseDate, Rating
Featured will pick the one first featured response and then pages the rest by Create Date. The default value is Featured.
IsOrderByDescending

true/false
Orders the result by descending or ascending. The default value is true (order by descending)
Id

Number
Gives the option to search for a certain review ID and only return that ID's information
Approved 

Valid values are either web or social
Filters by whether the review has been approved for the website or whether it has been approved for social posting (ex Facebook)
Tags 

Array of strings using tag values that exist on the install
Optionally filters by a tag that is on the review. Having multiple tags in the GET request will operate as an AND search.  

Sample GET Request and Response (XML)

GET http://{baseurl}/CSI/api/ReviewSearch?ManufacturerCode=M1
Content-Type: application/xml
<ReviewSearchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <Total>12</Total> 
    <PageSize>5</PageSize> 
    <PageNumber>1</PageNumber> 
    <RatingAverage>3.0234375</RatingAverage> 
    <Reviews> 
        <Review> 
            <Name>Dave S</Name> 
            <Rating>4</Rating> 
            <Title>This is a review</Title> 
            <Review>This is the review body</Review> 
            <IsFeatured>true</IsFeatured> 
            <OwnerCity>Romeo</OwnerCity> 
            <OwnerState>MI</OwnerState> 
            <ManufacturerName>Manufacturer 1</ManufacturerName> 
            <BrandName>Brand 1</BrandName>
            <BrandCode>Brand1</BrandCode>
            <ProductCode>Product1</ProductCode>
            <ProductTypeName>Boat</ProductTypeName> 
            <ProductName>Product 1</ProductName> 
            <ProductModelYear>2001</ProductModelYear> 
            <SurveyFormName>Initial Quality Survey</SurveyFormName> 
            <SurveyTypeCode>R0</SurveyTypeCode> 
            <SurveyTypeName>Initial Survey</SurveyTypeName> 
            <CreateDate>2016-02-08T10:35:56.87</CreateDate> 
        </Review> 
        <Review> 
            <Name>Anonymous</Name> 
            <Rating>4</Rating> 
            <Title>This is a review</Title> 
            <Review>This is the review body</Review> 
            <IsFeatured>false</IsFeatured> 
            <OwnerCity>Spokane</OwnerCity> 
            <OwnerState>WA</OwnerState> 
            <ManufacturerName>Manufacturer 1</ManufacturerName> 
            <BrandName>Brand 1</BrandName>
            <BrandCode>Brand1</BrandCode>
            <ProductCode>Product1</ProductCode> 
            <ProductTypeName>Boat</ProductTypeName> 
            <ProductName>Product 1</ProductName> 
            <ProductModelYear>1997</ProductModelYear> 
            <SurveyFormName>Initial Quality Survey</SurveyFormName> 
            <SurveyTypeCode>R0</SurveyTypeCode> 
            <SurveyTypeName>Initial Survey</SurveyTypeName> 
            <CreateDate>2016-02-08T10:35:56.87</CreateDate> 
        </Review> 
        <Review> 
            <Name>Thomas L</Name> 
            <Rating>4</Rating> 
            <Title>This is a review</Title> 
            <Review>This is the review body</Review> 
            <IsFeatured>false</IsFeatured> 
            <OwnerCity>Calgary</OwnerCity> 
            <OwnerState>AB</OwnerState> 
            <ManufacturerName>Manufacturer 1</ManufacturerName> 
            <BrandName>Brand 1</BrandName> 
            <BrandCode>Brand1</BrandCode>
            <ProductCode>Product1</ProductCode>
            <ProductTypeName>Boat</ProductTypeName> 
            <ProductName>Product 1</ProductName> 
            <ProductModelYear>2007</ProductModelYear> 
            <SurveyFormName>Initial Quality Survey</SurveyFormName> 
            <SurveyTypeCode>R0</SurveyTypeCode> 
            <SurveyTypeName>Initial Survey</SurveyTypeName> 
            <CreateDate>2016-02-08T10:35:56.87</CreateDate> 
        </Review> 
        <Review> 
            <Name>Gregory S</Name> 
            <Rating>4</Rating> 
            <Title>This is a review</Title> 
            <Review>This is the review body</Review> 
            <IsFeatured>false</IsFeatured> 
            <OwnerCity>Chester</OwnerCity> 
            <OwnerState>NJ</OwnerState> 
            <ManufacturerName>Manufacturer 1</ManufacturerName> 
            <BrandName>Brand 1</BrandName> 
            <BrandCode>Brand1</BrandCode>
            <ProductCode>Product1</ProductCode>
            <ProductTypeName>Boat</ProductTypeName> 
            <ProductName>Product 1</ProductName> 
            <ProductModelYear>2008</ProductModelYear> 
            <SurveyFormName>Initial Quality Survey</SurveyFormName> 
            <SurveyTypeCode>R0</SurveyTypeCode> 
            <SurveyTypeName>Initial Survey</SurveyTypeName> 
            <CreateDate>2016-02-08T10:35:56.87</CreateDate> 
        </Review> 
        <Review> 
            <Name>Anonymous</Name> 
            <Rating>5</Rating> 
            <Title>This is a review</Title> 
            <Review>This is the review body</Review> 
            <IsFeatured>false</IsFeatured> 
            <OwnerCity>Chester</OwnerCity> 
            <OwnerState>NJ</OwnerState> 
            <ManufacturerName>Manufacturer 1</ManufacturerName> 
            <BrandName>Brand 1</BrandName> 
            <BrandCode>Brand1</BrandCode>
            <ProductCode>Product1</ProductCode>
            <ProductTypeName>Boat</ProductTypeName> 
            <ProductName>Product 1</ProductName> 
            <ProductModelYear>2008</ProductModelYear> 
            <SurveyFormName>Initial Quality Survey</SurveyFormName> 
            <SurveyTypeCode>R0</SurveyTypeCode> 
            <SurveyTypeName>Initial Survey</SurveyTypeName> 
            <CreateDate>2016-02-08T10:35:56.87</CreateDate> 
        </Review> 
    </Reviews> 
</ReviewSearchResponse> 

Sample GET Request and Response (JSON)

GET http://{baseurl}/CSI/api/ReviewSearch?ManufacturerCode=M1
Content-Type: application/json
{ 
    "Reviews" : [{ 
        "Name" : "Dave S", 
        "Rating" : 4, 
        "Title" : "This is a review", 
        "Review" : "This is the review body", 
        "IsFeatured" : true, 
        "OwnerCity" : "Romeo", 
        "OwnerState" : "MI", 
        "ManufacturerName" : "Manufacturer 1", 
        "BrandName" : "Brand 1", 
        "BrandCode" : "Brand1",
        "ProductCode" : "Product1",
        "ProductTypeName" : "Boat", 
        "ProductName" : "Product 1", 
        "ProductModelYear" : 2001, 
        "SurveyFormName" : "Initial Quality Survey", 
        "SurveyTypeCode" : "R0", 
        "SurveyTypeName" : "Initial Survey", 
        "CreateDate" : "2016-02-08T10:35:56.87" 
    }, { 
        "Name" : "Anonymous", 
        "Rating" : 4, 
        "Title" : "This is a review", 
        "Review" : "This is the review body", 
        "IsFeatured" : false, 
        "OwnerCity" : "Spokane", 
        "OwnerState" : "WA", 
        "ManufacturerName" : "Manufacturer 1", 
        "BrandName" : "Brand 1", 
        "BrandCode" : "Brand1",
        "ProductCode" : "Product1",
        "ProductTypeName" : "Boat", 
        "ProductName" : "Product 1", 
        "ProductModelYear" : 1997, 
        "SurveyFormName" : "Initial Quality Survey", 
        "SurveyTypeCode" : "R0", 
        "SurveyTypeName" : "Initial Survey", 
        "CreateDate" : "2016-02-08T10:35:56.87" 
    }, { 
        "Name" : "Thomas L", 
        "Rating" : 4, 
        "Title" : "This is a review", 
        "Review" : "This is the review body", 
        "IsFeatured" : false, 
        "OwnerCity" : "Calgary", 
        "OwnerState" : "AB", 
        "ManufacturerName" : "Manufacturer 1", 
        "BrandName" : "Brand 1", 
        "BrandCode" : "Brand1",
        "ProductCode" : "Product1",
        "ProductTypeName" : "Boat", 
        "ProductName" : "Product 1", 
        "ProductModelYear" : 2007, 
        "SurveyFormName" : "Initial Quality Survey", 
        "SurveyTypeCode" : "R0", 
        "SurveyTypeName" : "Initial Survey", 
        "CreateDate" : "2016-02-08T10:35:56.87" 
    }, { 
        "Name" : "Gregory S", 
        "Rating" : 4, 
        "Title" : "This is a review", 
        "Review" : "This is the review body", 
        "IsFeatured" : false, 
        "OwnerCity" : "Chester", 
        "OwnerState" : "NJ", 
        "ManufacturerName" : "Manufacturer 1", 
        "BrandName" : "Brand 1", 
        "BrandCode" : "Brand1",
        "ProductCode" : "Product1",
        "ProductTypeName" : "Boat", 
        "ProductName" : "Product 1", 
        "ProductModelYear" : 2008, 
        "SurveyFormName" : "Initial Quality Survey", 
        "SurveyTypeCode" : "R0", 
        "SurveyTypeName" : "Initial Survey", 
        "CreateDate" : "2016-02-08T10:35:56.87" 
    }, { 
        "Name" : "Anonymous", 
        "Rating" : 5, 
        "Title" : "This is a review", 
        "Review" : "This is the review body", 
        "IsFeatured" : false, 
        "OwnerCity" : "Chester", 
        "OwnerState" : "NJ", 
        "ManufacturerName" : "Manufacturer 1", 
        "BrandName" : "Brand 1", 
        "BrandCode" : "Brand1",
        "ProductCode" : "Product1",
        "ProductTypeName" : "Boat", 
        "ProductName" : "Product 1", 
        "ProductModelYear" : 2008, 
        "SurveyFormName" : "Initial Quality Survey", 
        "SurveyTypeCode" : "R0", 
        "SurveyTypeName" : "Initial Survey", 
        "CreateDate" : "2016-02-08T10:35:56.87" 
       } 
    ], 
    "Total" : 12, 
    "PageSize" : 5, 
    "PageNumber" : 1 
    "RatingAverage" : 3.0234375 
}


Sample GET Requests with Query String Parameters

GET http://{baseurl}/CSI/api/ReviewSearch?ManufacturerCode=M1&PageNumber=2
GET http://{baseurl}/CSI/api/ReviewSearch?ManufacturerCode=M1&SurveyTypeCode=R0
GET http://{baseurl}/CSI/api/ReviewSearch?ManufacturerCode=M1&PageNumber=2&Approved=social