# Risk

> Turn what Aqoonsi knows about a person or business into a risk level, a score and the reasons behind it.

## Introduction

A risk assessment turns the facts Aqoonsi holds about a subject (verification results, screening, documents, country and ownership) into a level, a score and the reasons behind them, with a trace that reproduces the answer exactly. It never approves or declines anyone: it tells you how concerning the facts are and whether a person should look.

## Assessing a subject

```bash
curl https://api.aqoon.si/v1/assessments \
  -H "Authorization: Bearer $AQOONSI_KEY" \
  -H "Accept: application/vnd.api+json" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"data":{"type":"riskAssessments","relationships":{
    "subject":{"data":{"type":"people","id":"'"$PERSON_ID"'"}}}}}'
```

The assessment is computed at once and returned with `201`:

| Attribute  | Meaning                                                                       |
| ---------- | ----------------------------------------------------------------------------- |
| `level`    | `low`, `medium` or `high`: what to act on                                     |
| `score`    | 0 to 100                                                                      |
| `reasons`  | The codes of the rules that fired                                             |
| `review`   | `true` when a rule asks for a person to look, or the assessment is incomplete |
| `complete` | `false` when a fact could not be read because a source was unavailable        |
| `policy`   | The version of the platform policy the assessment used                        |
| `trace`    | Everything needed to reproduce the result                                     |

An assessment that asks for review opens a [case](cases.md).

## Unknown facts

Every input is a signal that is `known`, `unknown` (nothing recorded) or `unavailable` (a source could not answer). Unknown is never treated as clear and never as negative, and an unavailable fact never counts against anyone: it makes the assessment `complete: false` and asks for review.

## Reassessment

Once assessed, a subject is kept up to date. When its facts change, or a new version of the platform policy is released, Aqoonsi reassesses it with `trigger: reassessment`. Assessments are never edited; each one is a new record, so you can see how the level changed over time.

## Signals

The policy reads the signals Aqoonsi computes. The set is fixed; new signals arrive with Aqoonsi releases.

| Signal                                  | Subjects | Value                                                                            |
| --------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `liveness.result`                       | person   | `passed`, `failed`                                                               |
| `identity.match`                        | person   | `matched`, `notMatched`, `inconclusive`                                          |
| `face.match`                            | person   | `matched`, `notMatched`, `inconclusive`                                          |
| `duplicate.found`                       | person   | Another person has the same enrolled face                                        |
| `document.assessment`                   | both     | The worst of the subject's documents: `inconsistent`, `unreadable`, `consistent` |
| `screening.confirmed`                   | both     | A reviewer confirmed a match on a party still listed                             |
| `screening.open`                        | both     | Number of matches still pending or escalated                                     |
| `screening.complete`                    | both     | The latest full screening covered every list                                     |
| `jurisdiction.risk`                     | both     | `low`, `elevated` or `high` for the nationality or jurisdiction                  |
| `business.status`                       | business | `active`, `inactive`, `suspended`, `dissolved`, `unknown`                        |
| `ownership.unattributed`                | business | Percentage of ownership not traced to a person                                   |
| `ownership.cycles`                      | business | Circular ownership was found                                                     |
| `ownership.undeclared`                  | business | Computed beneficial owners differ from the declared ones                         |
| `ownership.confirmed`, `ownership.open` | business | The screening signals above, over the beneficial owners and controllers          |

## The policy

Every subject is assessed with the platform policy, the same for every account: version 1, 16 rules covering screening, identity, duplicates, documents, jurisdiction, business status and ownership. Each rule checks one or more signals, and when it fires it adds points, can raise the level to a floor, can ask for review and records its reason code. Rules that describe the same thing share a group, and only the highest of a group counts. The level is `low` below 30 points, `medium` below 60 and `high` from 60. The `trace` of an assessment shows every rule, whether it fired and why.

You cannot write a policy of your own. To treat one subject differently, override its level.

## Overrides

An owner or compliance officer can override an assessment's level with a written note and an optional expiry (`POST /v1/assessments/{id}/overrides`). The computed level and the trace never change; `level` shows the override while it is in force. Overrides are decisions for people; API keys cannot make them.
