document_check
Flags and reasons
A flag is a category of finding. The set of flag codes is closed and stable. Branch onflag.code in your integration and it will keep meaning the same thing.
A reason is one concrete observation that produced the flag. A flag always has at least one,
and often several: two independent routes to the same conclusion is stronger evidence than one,
so we return both rather than collapsing them.
flag.description is a one-line headline. flag.pages is the union of the pages named by its
reasons.
status
While
processing, verdict fields (decision, risk_score, summary, flags, …) are
null/empty but the object shape is the same, so pollers never branch on which keys exist. That
holds for nested objects too: every extracted field is present and null before extraction has
run, rather than the block being empty.
decision
Assigned by the analysis engine (with score-band realignment after rule deltas):
risk_score
An integer from 0 to 100. Higher means riskier, in the same direction as risk_level. It is
null until the check completes.
decision is our default cut of that number, and the bands are fixed and published:
Because the bands are contiguous and never move,
decision is always recoverable from
risk_score. The two can never tell you different things.
Setting your own line
Useaction when you want workflow routing (approve / review / reject) to follow your
appetite, or cut on risk_score yourself in your integration. action is not a decision and
not a processing state: the verdict stays clear / pending / suspicious / fraudulent. Set cut lines via
GET/PATCH /api/v1/thresholds/ or the Rules page. Those values are snapshotted onto each check so
later edits do not rewrite history.
score_delta
(positive = riskier). After that nudge, decision is re-aligned to the score band so the
two stay consistent. Triggered rules are shown on the document viewer.
A
clear document is still scored. Signals that were not strong enough to publish as flags (a
rebuilt PDF, a named editing tool) still move it within 0–39, which is what gives you something
to tune against across the documents that pass. This is why a clear result can score 18 while
showing an empty flags array.What the API does not return
The original file, each stored PDF revision, the highlighted diff between revisions, and the raw structural dump are not part of the response. They are material for a human to look at, and that review happens in the dashboard, where every finding is rendered against the page it came from. You always keep the file you uploaded, anddocument.sha256 lets you tie a result back to it.