The risk assessment endpoint — the reason this API exists.
assess/3 runs a rule set against one company and returns every risk flag it
raised, alongside the evidence each rule was evaluated against.
Queued assessments
A cold assessment fans out to a dozen upstream sources and can take longer than
a sensible HTTP timeout, so the API may accept the request with 202 Accepted
and a job id instead of holding the connection open. This module hides that: it
polls the job to completion and returns the finished
KYCCentral.Assessment.t/0 either way. Pass wait: false to get the raw
envelope back and drive the polling yourself.
Summary
Functions
Assess one company against a rule set.
Functions
@spec assess(KYCCentral.t(), String.t() | keyword(), keyword()) :: {:ok, KYCCentral.Assessment.t() | map()} | {:error, KYCCentral.Error.t()}
Assess one company against a rule set.
Pass a company number, or q: "name" to assess the top search result — but
prefer the number, so you always know which entity you screened.
Requires an API key on every plan. Free-plan keys are capped at a fixed
number of assessments per calendar month; exceeding it returns a
%KYCCentral.Error{kind: :rate_limit}. Cached results and failed runs do not
consume quota.
Options
:q— company name to search instead of passing a number. Mutually exclusive withcompany_number.:rule_set_id— rule set slug. Defaults to the API's"default"set; seeKYCCentral.RuleSets.list/1.:rule_code— run a single rule instead of a whole set, e.g."ACCOUNTS_OVERDUE". Overrides:rule_set_id.:confirmed_media_urls— adverse-media article URLs an analyst has already confirmed as genuine. Unconfirmed matches only ever raise a low-severityADVERSE_MEDIA_UNCONFIRMEDflag; listing a URL here promotes that article to its full severity.:confirmed_leak_ids— ICIJ Offshore Leaks match ids, promoted the same way.:confirmed_psc_shareholder_links— analyst-confirmed identity links, each formatted"<psc name>||<shareholder name>".:wait— poll a queued assessment to completion. Defaults totrue.:poll_interval— milliseconds between polls. Defaults to2000.:poll_timeout— give up waiting after this many milliseconds. Defaults to180000.
Examples
{:ok, assessment} = KYCCentral.KYC.assess(client, "00445790")
{:ok, assessment} = KYCCentral.KYC.assess(client, q: "tesco plc")
{:ok, assessment} = KYCCentral.KYC.assess(client, "00445790", rule_set_id: "quick")