Star Ratings
Introduction
The API will return overall star rating and average star rating, source wise for locations and providers.
Before using the API, an Application must be provisioned by Press Ganey Consumer Experience. The Application credentials will be made available in the API settings page of the Binary Health Analytics platform. The Application ID and Application Secret create a unique combination that will be used for authorization in all the API calls. Use the Application ID and Application Secret to receive an Access Token. The access token is needed to start making server to server API calls and is valid for a limited period of time
Star Ratings for Single Location/Physician
Use GET request to return data for single node.
Endpoint
GEThttps://api.binaryfountain.com/api/service/v1/starrating
Header Parameters
Property | Type | Description | Required/Optional |
---|---|---|---|
Access-Token | String | Access token received from the platform | Required |
Request Parameters
Property | Type | Description | Required/Optional |
---|---|---|---|
locationId | String | Unique code of a location for which data is requested. | Required – either location or physician is needed as parameter |
personId | String | Unique code of a physician for which data is requested. | Required – either location or physician is needed as parameter |
fromDate | String | From date in ISO 8601 format | Required |
toDate | String | To date in ISO 8601 format | Required |
JSON Response
A JSON object containing the star ratings.
Sample Response JSON
{
"filter": {
"period": {
"from": "2020-01-01T00:00:00Z",
"to": "2020-05-31T00:00:00Z"
}
},
"nodes": {
"sources": [
{
"hasRating": false,
"overallRating": "--",
"allTimeFeedbackCount": "--",
"feedbackCount": 63,
"avgRating": "--",
"sourceName": "Instagram Tagged Posts",
"id": 101351
},
{
"hasRating": true,
"overallRating": "0.0",
"allTimeFeedbackCount": "0",
"feedbackCount": 4,
"avgRating": "5.0",
"sourceName": "Google",
"id": 100171
}
],
"reviewCount": 1616,
"person": null,
"averageRating": 3.1,
"name": "Venacava Healthcare",
"id": 1175695,
"type": "Business Unit",
"parentId": 41730,
"Location": "Venacava Healthcare"
},
"version": "v1.0",
"status": {
"code": 200,
"message": "success"
}
}
JSON Response Tags
Property | Type | Description |
---|---|---|
filter | Object | The filters applied on the testimonials |
nodes | Object | Json Object |
Location | String | Location Name |
person | String | Person Name |
reviewCount | Integer | No. of reviews (for all sources) |
averageRating | Double | Average Star rating (for all sources) |
name | String | Avatar Name |
id | Integer | Avatar id |
type | String | Avatar Type |
parentId | Integer | Parent Avatar id |
sources | JSON Array | Array of node (Sources available for location/person) |
sources.overallRating | String | Rating shown on website at time of query |
sources.hasRating | Boolean | Whether source has rating or not |
sources.allTimeFeedbackCount | String | Total Feedback per source for all time (displayed on website) |
sources.feedbackCount | Integer | Feedback records per source for timeframe defined |
sources.avgRating | String | Average Star Rating per source for timeframe defined |
sources.sourceName | String | Source Name |
sources.id | Integer | Source Id |
Star Ratings for Multiple Location/Physician
Use POST request to return data for more than one location or physician.
Endpoint
POSThttps://api.binaryfountain.com/api/service/v1/starrating
Header Parameters
Property | Type | Description | Required/Optional |
---|---|---|---|
Content-Type | application/json | Content in JSON format | Required |
Access-Token | String | Access token received from the platform | Required |
Request Parameters
Property | Type | Description | Required/Optional |
---|---|---|---|
code | Array | Array of location id or person id for which data is requested. | Required |
locationId | String | Unique code of a location for which data is requested. | Required – either location or physician is needed as parameter |
personId | String | Unique code of a physician for which data is requested. | Required – either location or physician is needed as parameter |
fromDate | String | From date in ISO 8601 format | Required |
toDate | String | To date in ISO 8601 format | Required |
Sample Request JSON
{
"code": [
{
"locationId": "565732"
},
{
"locationId": "1548355"
}
],
"fromDate": "2017-12-26T05:00:00Z",
"toDate": "2018-12-26T23:59:59Z"
}
JSON Response
A JSON object containing the star ratings.
Sample Response JSON
{
"filter": {
"period": {
"from": "2020-01-01T00:00:00Z",
"to": "2020-05-31T00:00:00Z"
}
},
"nodes": {
"sources": [
{
"hasRating": false,
"overallRating": "--",
"allTimeFeedbackCount": "--",
"feedbackCount": 63,
"avgRating": "--",
"sourceName": "Instagram Tagged Posts",
"id": 101351
},
{
"hasRating": true,
"overallRating": "0.0",
"allTimeFeedbackCount": "0",
"feedbackCount": 4,
"avgRating": "5.0",
"sourceName": "Google",
"id": 100171
}
],
"reviewCount": 1616,
"person": null,
"averageRating": 3.1,
"name": "Venacava Healthcare",
"id": 1175695,
"type": "Business Unit",
"parentId": 41730,
"Location": "Venacava Healthcare"
},
"version": "v1.0",
"status": {
"code": 200,
"message": "success"
}
}
JSON Response Tags
Property | Type | Description |
---|---|---|
filter | Object | The filters applied on the testimonials |
nodes | Object | Json Object |
Location | String | Location Name |
person | String | Person Name |
reviewCount | Integer | No. of reviews (for all sources) |
averageRating | Double | Average Star rating (for all sources) |
name | String | Avatar Name |
id | Integer | Avatar id |
type | String | Avatar Type |
parentId | Integer | Parent Avatar id |
sources | JSON Array | Array of node (Sources available for location/person) |
sources.overallRating | String | Rating shown on website at time of query |
sources.hasRating | Boolean | Whether source has rating or not |
sources.allTimeFeedbackCount | String | Total Feedback per source for all time (displayed on website) |
sources.feedbackCount | Integer | Feedback records per source for timeframe defined |
sources.avgRating | String | Average Star Rating per source for timeframe defined |
sources.sourceName | String | Source Name |
sources.id | Integer | Source Id |