Explainable risk score for a customer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | — |
Request
This endpoint has no request body.
curl "$MONICHEK_API/scores/customers/{id}" \
-H "Authorization: Bearer $MONICHEK_API_KEY"const res = await fetch(`${MONICHEK_API}/scores/customers/{id}`, {
method: "GET",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
},
});
const data = await res.json();import os
import requests
res = requests.get(
f"{os.environ['MONICHEK_API']}/scores/customers/{id}",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
)
print(res.json())$ch = curl_init(getenv('MONICHEK_API') . '/scores/customers/{id}');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Replace {id} with the resource id.
Responses
200 OK
score with factors, guidance, peer percentile, history, EDD tasks
application/json
{
"object": "score",
"customer_id": "cus_01M3R...",
"rating": "low",
"band": "low",
"score": 30,
"score_explained": 30,
"unexplained_weight": 0,
"band_guard_applied": false,
"factors": [
{
"name": "base",
"contribution": 10,
"detail": "Model baseline",
"guidance": "Standing risk floor applied before any factor."
},
{
"name": "kyc_tier1",
"contribution": 15,
"detail": "KYC tier: tier1",
"guidance": "Identity is thinly verified."
}
]
}Error responses
| Status | Meaning | Body |
|---|---|---|
| 401 | Unauthorized | RFC 9457 problem |
| 404 | Not Found | RFC 9457 problem |
Errors use the RFC 9457 problem format with a stable code.