Skip to main content

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

PropertyTypeDescriptionRequired/Optional
Access-TokenStringAccess token received from the platformRequired

Request Parameters

PropertyTypeDescriptionRequired/Optional
locationIdStringUnique code of a location for which data is requested.Required – either location or physician is needed as parameter
personIdStringUnique code of a physician for which data is requested.Required – either location or physician is needed as parameter
fromDateStringFrom date in ISO 8601 formatRequired
toDateStringTo date in ISO 8601 formatRequired

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

PropertyTypeDescription
filterObjectThe filters applied on the testimonials
nodesObjectJson Object
LocationStringLocation Name
personStringPerson Name
reviewCountIntegerNo. of reviews (for all sources)
averageRatingDoubleAverage Star rating (for all sources)
nameStringAvatar Name
idIntegerAvatar id
typeStringAvatar Type
parentIdIntegerParent Avatar id
sourcesJSON ArrayArray of node (Sources available for location/person)
sources.overallRatingStringRating shown on website at time of query
sources.hasRatingBooleanWhether source has rating or not
sources.allTimeFeedbackCountStringTotal Feedback per source for all time (displayed on website)
sources.feedbackCountIntegerFeedback records per source for timeframe defined
sources.avgRatingStringAverage Star Rating per source for timeframe defined
sources.sourceNameStringSource Name
sources.idIntegerSource 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

PropertyTypeDescriptionRequired/Optional
Content-Typeapplication/jsonContent in JSON formatRequired
Access-TokenStringAccess token received from the platformRequired

Request Parameters

PropertyTypeDescriptionRequired/Optional
codeArrayArray of location id or person id for which data is requested.Required
locationIdStringUnique code of a location for which data is requested.Required – either location or physician is needed as parameter
personIdStringUnique code of a physician for which data is requested.Required – either location or physician is needed as parameter
fromDateStringFrom date in ISO 8601 formatRequired
toDateStringTo date in ISO 8601 formatRequired

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

PropertyTypeDescription
filterObjectThe filters applied on the testimonials
nodesObjectJson Object
LocationStringLocation Name
personStringPerson Name
reviewCountIntegerNo. of reviews (for all sources)
averageRatingDoubleAverage Star rating (for all sources)
nameStringAvatar Name
idIntegerAvatar id
typeStringAvatar Type
parentIdIntegerParent Avatar id
sourcesJSON ArrayArray of node (Sources available for location/person)
sources.overallRatingStringRating shown on website at time of query
sources.hasRatingBooleanWhether source has rating or not
sources.allTimeFeedbackCountStringTotal Feedback per source for all time (displayed on website)
sources.feedbackCountIntegerFeedback records per source for timeframe defined
sources.avgRatingStringAverage Star Rating per source for timeframe defined
sources.sourceNameStringSource Name
sources.idIntegerSource Id