Overview

At TrustSpot there are 2 different types of reviews that we help customers collect & display on their site: 

  • Company Reviews  
  • Product Reviews

The difference is, Company Reviews are meant to be about your brand, the customer's experience, shipping, and more generalized language to speak about your company as a whole. 

While Product Reviews are about the customer reviewing a specific product after purchase.  

-

Types of APIs

Our API documentation is split into 2 components: 

  1. GET = Pull review content onto your site for use on your site anyway you see fit. Some examples include: Custom review displays, search results, and data analytics.
  2. POST = Send the customer's information to TrustSpot in order to later trigger a review request to be send to them (based on your automatic email settings). 

To utilize TrustSpot's API, you will need to know your:

  • Merchant ID
  • API Key
  • API Secret Key

All of which are available within your Account Settings area. 

-

Product Review API Integration

If you have a custom eCommerce website and would like to start collecting reviews for the products you sell, this article describes the necessary steps to take. 

-

Step 1:  Implement Product Review POST API

Once an order is completed on your store, you will need to call our POST API and push the order information. Typically this information includes the customer's name & email, along with the product they purchased. 

We recommend to send orders to our system once an order is "Shipped" from your company. 

The next few steps will outline how to show Product Reviews on your website. 

-

Step 2: Add TrustSpot JS to Site

Now that your store is successfully connected to TrustSpot, the next step is to add the JS script to your site. This is required so that our content can load on your store. 

Copy & Paste the below code below the HEAD on your website:

<link href="https://trustspot.io/index.php/api/pub/product_widget_css/XXXX/widget.css" rel="stylesheet" type="text/css"/><link rel="stylesheet" type="text/css" href="https://trustspot.io/assets/css/font-awesome.min.css"><script>trustspot_key='YYYY';</script><script src="https://trustspot.io/assets/js/trustspot_product_reviews.js"></script> 

  • Replace XXXX with your TS Merchant ID, found under: Account Settings
  • Replace the YYYY with your TS API Key, found under: Account Settings

-

Step 3: Add the Reviews Widget

This adds the review widget to your product page in order to show off all of your review, photo and Q&A content.

<div class="trustspot trustspot-main-widget"
data-product-sku="{ product.sku }"
data-name="{ product.name }"
data-url="{ product.url }"
data-image-url="{ product.image_url }"
data-description="{ product.description }">
</div>
  • You will need to replace the sample values above with your own data. Example, you would replace { product.sku } with the real SKU on the product page. 

To customize all of the colors and fonts associated with the Widget, you will need to go to:   Product Reviews > General Settings > Review Widget. 

-

Step 4: Add the Product Inline Stars

The Inline Product Stars are often placed at the top of the product page, below the title or the price. When a visitor clicks on this link, it will push them down the page automatically to show the Reviews Widget. 

<div class="trustspot-inline-product" data-product-sku="{ product.sku }"></div> 

To customize the size of the product inline stars or to show a different display style, you will need to go to:   Product Reviews > General Settings > Review Widget.

-

Step 5: Add the Category Inline Stars

The Category Inline Stars are Optional, but their often used to show the number of reviews a product has, if a customer is looking at a category page. For example: If you have a category called "Shirts" that contains 10 types of Shirts, this star rating will show the # of reviews below each product listing on the category page. 

<div class="trustspot-inline-category" data-product-sku="{ product.sku }"></div> 

To customize the size of the category inline stars or to show a different display style, you will need to go to:   Product Reviews > General Settings > Review Widget.

-

Pricing Plans

The Company "POST" API is available starting on the Startup Plan, while the Product "POST" API is available starting on the Growth Plan. This is because our Product Reviews feature starts on the Growth Plan. 

In addition the Display API "GET" is available for both review types starting on the Premium Plan. 

-

Request API Access

If you'd like to start using our API, please contact our support team via Live Chat (bottom right of the site) or by emailing us at:  support@trustspot.io , and we will respond within 24 hours with the API documentation.

If you have any questions on this article or the API in general, please reach out to our support team.

Did this answer your question?