Customer success
Health score per customer.
Health score per customer. Reading never writes a snapshot.
Health score of every customer (read only, no snapshot is written)
GET /success/health
| Scope | Package | Idempotency-Key |
|---|---|---|
success:read | Scale (API) | not used |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | 1 to 100. Default 25. |
offset | query | integer | Default 0. |
band | query | string | One of good, medium, low, unknown. |
at_risk | query | boolean | true: only customers with at least one risk. |
Request
curl "https://hevia.app/api/v1/success/health?at_risk=true" \
-H "Authorization: Bearer $HEVIA_KEY"Response
200 OK.
JSON
{
"data": [
{
"contact_id": "e:anna@example.com",
"name": "Anna Example",
"score": 82,
"band": "good",
"coverage": 0.8,
"trend": 1,
"risks": [
"example risk"
],
"key_account": false
}
],
"pagination": {
"limit": 25,
"offset": 0,
"total": 1,
"next_offset": null
}
}Fields of CustomerHealth:
| Field | Type | Description |
|---|---|---|
contact_id | string | |
name | string | null | |
score | integer | null | 0-100, null when there is no data. |
band | string | One of good, medium, low, unknown. |
coverage | number | Share of the score weight that had data (0-1). |
trend | integer | null | Change of the score against the earlier snapshot. |
risks | string[] | |
key_account | boolean |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Invalid request |
| 401 | unauthorized | Missing or invalid key |
| 403 | insufficient_scope | The key or token does not have the scope of the endpoint. |
| 403 | plan_required | The business's package does not include the API (Scale) or the feature of the endpoint. |
| 429 | rate_limited | Rate limit (120 requests per minute and key); see the RateLimit-* headers |