Get health score API
GET /v2/accounts/{account_id}/healthscore
Description:
This API request returns the health scores of an account over a period of time (up to a year).
API Limit:
600 requests per minute. Client receives 429 once over the limit.
Method Details:
HTTP method: GET
Response format: JSON
Headers:
useriq-api-key: Your valid API key generated from the site settings page
Content-Type: application/json
Parameters:
Path Parameter:
-
{account_id}: required, the account ID for the account you want the health score.
Query Parameters:
-
detailed: optional, true or false. The default is false. When supplied in query string ?detailed=true, the response contains detailed scores in the sub categories for the calculated health scores.
Response:
Status code 200:
The body contains the result, which is a list of health scores for the requested account_id, ordered by effective_at ascending.
Response body fields:
In the result list, each record contains site_id, account_id, effective_at, updated_at and health_score. The health_score field is the calculated final score.
When detailed=true is supplied in the request, more sub category scores are returned if they exist, including sentiment_nps, sentiment_rating, sentiment_feedback,adoption_active_last,adoption_active_days, adoption_active_users, open_tickets and renewal.
Note that when a sub category score does not exist, it is not counted in the final score calculation regardless whether there is a weight assigned in the health score config settings.
Other Status codes:
400: Bad request
401: Unauthorized
429: Too many requests
Non 200 response may come with a non-null message field describing the cause.
Example GET Request:
1. Example Request:
https://api.useriq.com/v2/accounts/1234/healthscore
Example Response
{
"success": true,
"result": [
{
"site_id": 1234567,
"account_id": "1234",
"effective_at": "2020-07-01 12:00:00.0",
"updated_at": "2020-10-07 12:01:43.0",
"health_score": 75,
},
{
"site_id": 1234567,
"account_id": "1234",
"effective_at": "2020-07-02 12:00:00.0",
"updated_at": "2020-10-07 12:02:50.0",
"health_score": 65,
}
...
]
}
2. Example Request with optional query param detailed=true:
https://api.useriq.com/v2/accounts/1234/healthscore?detailed=true
Example Response:
{
"success": true,
"result": [
{
"site_id": 1234567,
"account_id": "1234",
"effective_at": "2020-07-01 12:00:00.0",
"updated_at": "2020-10-07 12:01:43.0",
"health_score": 75,
"sentiment_nps": 60,
"sentiment_rating": 60,
"sentiment_feedback": 70,
"adoption_active_last": 80,
"adoption_active_days": 70,
"adoption_active_users": 30,
"open_tickets": 0,
"renewal": 100
},
{
"site_id": 1234567,
"account_id": "1234",
"effective_at": "2020-07-02 12:00:00.0",
"updated_at": "2020-10-07 12:02:50.0",
"health_score": 65,
"sentiment_nps": 40,
"sentiment_rating": 66,
"sentiment_feedback": 60,
"adoption_active_last": 40,
"adoption_active_days": 60,
"adoption_active_users": 30,
"open_tickets": 0,
"renewal": 100
},
{
"site_id": 1234567,
"account_id": "1234",
"effective_at": "2020-07-03 12:00:00.0",
"updated_at": "2020-10-07 12:02:50.0",
"health_score": 60,
"adoption_active_users": 30,
"open_tickets": 100,
"renewal": 100
}
...
]
}

Comments
0 comments
Please sign in to leave a comment.