KRI snapshot
Program KRIs over a rolling window, rolled into the Program Risk Skoor.
Per program: ACH return rates against NACHA thresholds, reserve coverage, review and hold aging, overdraft and freeze events, velocity, counterparty concentration, verification denial rate, card decline mix. Each KRI carries value | null, n, threshold and a status; the Program Risk Skoor (prs-v1) is null until at least three KRIs have n above zero. Snapshots run every 15 minutes, after every 200 transfers, and on demand.
KriSnapshot
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| tenantId | string (uuid) | |
| programId | string (uuid) | |
| asOf | string (date-time) | |
| windowDays | integer | |
| kris | Record<string, KriValue> | One KriValue per KRI name (ach_overall_return_rate, reserve_coverage, …). |
| programSkoor | integer | null | Program Risk Skoor (prs-v1); null until at least three KRIs have n > 0. |
| programSkoorN | integer | null | |
| programSkoorVersion | string | null | |
| createdAt | string (date-time) |
KriValue
| Field | Type | Notes |
|---|---|---|
| value | number | null | null = not measured. |
| n | integer | |
| unit | "ratio" | "count" | "cents" | "days" | "hours" | |
| threshold (optional) | number | null | |
| status | "ok" | "watch" | "breach" | "unmeasured" | |
| note (optional) | string |
Endpoints
post/api/kri/snapshot/{programId}
Take a KRI snapshot now
Computes every KRI for the program over its window, stores the snapshot, and emits kri.snapshot so the program detectors run. Operator token of the owning tenant; X-Operator is not required.
| Auth | Bearer (program's tenant); no X-Operator |
|---|---|
| Operation | KRI snapshot · POST /api/kri/snapshot/{programId} |
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| programId | path | string (uuid) | Program id. |
Responses
200 — The new snapshot id. Read it back inside the program report. object
| Field | Type | Notes |
|---|---|---|
| snapshotId | string (uuid) |
401 — Bearer is not the owning tenant's operator token. Error
| Field | Type | Notes |
|---|---|---|
| error | string | What went wrong, in one sentence. |
| requestId (optional) | string | Present once the gateway is live: the X-Request-Id of the failed request. |
404 — Program not found. Error
| Field | Type | Notes |
|---|---|---|
| error | string | What went wrong, in one sentence. |
| requestId (optional) | string | Present once the gateway is live: the X-Request-Id of the failed request. |
Example
curl -s -X POST "https://skoor.ai/risk/api/kri/snapshot/a1e0c2d4-6b7f-4d8e-9a3b-0c1d2e3f4a55" \ -H "Authorization: Bearer test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"