# Screening

> Screen people and businesses against sanctions lists, review potential matches and monitor subjects as the lists change.

## Introduction

Screening compares a person or a business with official sanctions lists. It reports listed parties that **resemble** the subject, with the evidence for each, and leaves the decision to your team. A result is never "sanctioned": it is a potential match awaiting review.

A person who passes a verification is screened automatically; see [reading the result](people.md#reading-the-result). Screen any subject yourself with the API below.

## Screening a subject

```bash
curl https://api.aqoon.si/v1/screenings \
  -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":"screeningChecks","relationships":{
    "subject":{"data":{"type":"people","id":"'"$PERSON_ID"'"}}}}}'
```

The check runs in one request and returns `201` with a `screeningChecks` resource:

| Attribute  | Meaning                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------- |
| `outcome`  | `potentialMatch` when at least one listed party scored at or above the threshold, otherwise `clear` |
| `count`    | The number of potential matches                                                                     |
| `coverage` | Each list, and whether this check could rely on it                                                  |
| `complete` | `true` only when every list was current and fully searched                                          |

A `clear` outcome with `complete: false` speaks only for the lists that were covered. If no list is available at all, the request returns `503 screening.unavailable` and records nothing.

`GET /v1/datasets` shows which lists Aqoonsi screens against and how current each one is.

## What is compared

For a person: names (including verified full names), date of birth, nationality, and national ID and passport numbers. For a business: legal and trading names and the registration number. Names are compared across spellings and transliterations common in Somali, Arabic and Persian names; the score explains every part of the comparison.

## Reviewing matches

List potential matches with `GET /v1/matches` (`filter[status]=pending`). Each match has a `score` from 0 to 1, a `breakdown` that explains it, and the `listing` as it was when the check ran.

A team member reviews each match in the dashboard with a decision and a note:

| Decision        | Meaning                                                                                                               |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| `falsePositive` | This listed party is not the subject. It is not reported again for this subject unless the listing changes materially |
| `confirmed`     | The subject is this listed party                                                                                      |
| `escalated`     | Handed to compliance, who make the final decision                                                                     |

Reviews are decisions for people; API keys cannot make them. A check with potential matches also opens a `match` [case](cases.md) for the subject.

## Monitoring

Lists change. `POST /v1/monitors` with a `subject` and an `Idempotency-Key` watches a subject: it screens them at once as a baseline, then rescreens them whenever a list changes.

- A new potential match is recorded as a check with `trigger: monitoring` and sends `screening.potentialMatch`. Nothing is recorded when nothing is new.
- When a matched party is removed from its list, the match becomes `delisted` and `screening.listingRemoved` is sent.
- Pause a monitor with `PATCH /v1/monitors/{id}` (`status: paused`); resuming screens the subject again in full. End it for good with `DELETE /v1/monitors/{id}`.

Monitor events reach a webhook only for monitors created with an API key: they are delivered to that key's application.
