Test Client, from two documents to a risk assessment. It runs against the sandbox with the key you created in Test in the sandbox.
What you need
Use fake data only. These calls send a
reference, so the files are filed on your own case instead.
The plan
POST /v1/kyc/extractwith the payslip.POST /v1/kyc/extractwith the CIN.- Build
valuesfrom what was read plus what the client declared. POST /v1/kyc/assesswithvaluesand thedocumentsentries unchanged.
doc_type applies to every file in a call, so one document type per call.
Why a CIN in a payslip walkthrough: with the default rules a verification needs a government photo ID among the documents (required:photo_id is critical). A payslip alone would be blocked. A payslip is supporting evidence, not identity.
Why annual_income is typed in step 3: the reader is told never to estimate. A payslip shows one period’s pay, so annual_income comes back only if the payslip prints it. The walkthrough takes income from the client’s own application form, and the payslip supplies the employer and the occupation.
Complete code
/extract answers and runs Sahl’s verification and scoring code on the body they send, so the printed numbers below are what the engine computes for this input. The live reader will return the fields it sees on your files, which can differ.
Expected output
case is a real id in your answer. The order of the payslip fields can differ. In a production environment with the full sanctions list loaded, the screening line is the info check Sanctions screening — no matches; PEP not list-screened. If your environment only has the 30-name sample list, flags also shows screening and compliance risk becomes Medium (2 points).
What each step returned
1. Payslip
checks is empty. It gives employer, occupation and the holder name. It is also what kyc.documents_read reports on.
2. National ID (CIN)
checks shows four passes: its key fields were read, it is not expired, the CIN number is well-formed (format:cin:, one or two letters then five to seven digits, for example BK123456) and the holder is an adult. The sample uses country MA and id_type National ID, which the engine accepts as they are.
4. Assessment
passed: true: no critical check failed.- The single flag is
completenessat 61 percent: the walkthrough sent no address, phone or email, no PEP answer. A person should fill them in. The engine’s list of required data points is North American: it also asks for aprovinceand asin/ssn, which a Moroccan file cannot always give, so a Moroccan file stays below 100 percent. It also costs one risk point, so compliance risk isLow(the ceiling for Low is 1 point). - Risk profile 58 is the arithmetic in Risk assessment. Capacity 20 comes from income 84,000, liquid assets 20,000 and net worth 60,000, read here as MAD. The engine reads amounts as plain numbers against fixed bands that are not currency specific.
Try the failure paths
In the console
Open Cases, findclient-0001 in sandbox. The documents, the checks and the verdict are filed there. The same calls are in Developers, Call log.
Next
Recipes
Five working use cases.
Go live
What to check before production.