ResellerRatings API for Brand Reviews is the API’s constructed to tell a story about brand reviews, your review data collection effort, product reviews, and the collection of reviews around ResellerRatings as a business unit.
This tutorial will guide you to Implement ResellerRatings API to Get Start Rating Reviews from Third Party Site - 5 Easy Steps. let's see how:
![](http://findnerd.s3.amazonaws.com/imagedata/9148/9148.png)
1: Acquiring your Authentication Key and Authentication Flow
First, you need to obtain an API key (Client Id) and API secret (Client Secret) from your
ResellerRatings client success manager. You can view these values in the Portal by navigating to Tools > Showcase & Integrate > API Access.
To authorize a secure API request, you must request an access token using your client credentials. To request an access token, you will make the following request:
POST https://api.resellerratings.com/oauth/access_token
CURL EXAMPLE :
curl --data
"grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SEC
RET>" https://api.resellerratings.com/oauth/access_token
Breaking down that request, you will POST the following parameters to
https://api.resellerratings.com/oauth/access_token
- grant_type: This value should always be “client_credentials”
- client_id: Your Client ID as assigned in the Portal
- client_secret: Your Client Secret as assigned in the Portal
- scope (optional): If the resources you are requesting require specific scope(s), use this value to pass a comma delimited list of scope names
If successful, this request will return the following JSON:
{"access_token": <AccessToken> ,
"token_type": "Bearer",
"expires_in": 21600
}
2: Using your access token to request a resource
Once you receive your access token you must include it in the header of every API resource request.
This will be done with the Authorization HTTP request header field with the value: “Bearer
<AccessToken> ”
Example:
Authorization: Bearer KSnAP0vKRVAt3j3p4BR5dz5KpKemTk3ru7oZl0Dz
3: Getting your Business Unit ID
Replace the SELLER ID with your actual SELLER ID and replace the API Key with your API Key. You can find your Unique SellerID under the Tools > Syndicate &Integrate > API Access
4: Store Unit - Seller Data
Resource URI: https://api.resellerratings.com/v1/seller/{sellerId?}
Authentication: OAuth 2.0 Bearer Token
Response: {
"data": {
"id": < seller id > ,
"type": "seller",
"name": < seller display name > ,
"rating": < store rating > ,
"starRating": < star rating > ,
"websiteUrl": < store URL > ,
"seoName": < SEO name > ,
"reviews": {
"total": < lifetime total reviews > ,
"one_star": < lifetime one star reviews > ,
"two_star": < lifetime two star reviews > ,
"three_star": < lifetime three star reviews > ,
"four_star": < lifetime four star reviews > ,
"five_star": < lifetime five star reviews >
},
"categories": [{},
"id": < category id > ,
"name": < category name >
<
... >
],
"links": [{
"rel": "uri":
},
{
"rel": "uri":
},
{
"rel": "uri":
}
]
"self",
"/seller/ <seller id> "
"reviews",
"/seller/ <seller id> /review s"
"tags",
"/seller/ <seller id> /tags"
}
}
5: Add the dynamic values of rating and reviews getting from above API in Schema.org JSON-LD.
After then, put this code before the end of body tag:
<script type="application/ld+json">
{ "@context": "http://schema.org",
"@type": "Product",
"name": "Invisalign",
"aggregateRating":
{"@type": "AggregateRating",
"ratingValue": "4.9", // overall rating
"reviewCount": "7" // reviews
}
}
</script>
wait for 1-2 days while Google crawl your website URL then you will get your star ratings and reviews while google organic search.
Hope it works!
https://www.resellerratings.com/
0 Comment(s)