REST API: KYC

The session object

One object describes a session and all its steps.

Where it appears

Create session, session status, list sessions, filter sessions and recognize documents and selfies all return this object, or a list of it. The same object is what the widget hands to your page when a session succeeds.

Top-level fields

FieldTypeDescription
sessionIdstring (uuid)The identifier of the session. Every other KYC operation takes it.
statusstringThe session status. See session statuses.
schemaIdstring (uuid)The scenario the session was created from.
clientIdstringThe identity the session resolved to. Empty until the documents are recognized.
clientKeystringYour own identifier for the person, echoed back. See working with clientKey.
clientUserstringYour own identifier for the operator, echoed back. It need not be unique.
isClientNewbooleanWhether the resolved identity had not been seen on this account before.
spentnumberSeconds from the creation of the session to the moment it first reached a final status; zero while it has not.
secondsToLivenumberSeconds left before the session expires. At zero an idle or processing session is reported as expired.
createdAtstring (date-time)When the session was created.
responseTimestring (date-time)When this answer was built, by the server clock.
errorsarray of stringSession-level error codes. They are symbolic codes, not prose.
resultsarray of objectOne entry per step of the scenario.
pdErasedbooleantrue from the moment the destruction of personal data began. The object keeps identifiers, statuses, errors and verdicts and carries no recognized value, contact or media link.
pdErasedAtstring (date-time)When the destruction was completed, a UTC timestamp. Null while it is not complete.

The results list

results holds one entry per step of the scenario, in order, and the faces entry last. While a session is still being processed asynchronously it can be empty, and the results are read back with session status. The fields below depend on the kind of step.

FieldTypeDescription
results[].typestringThe kind of step: document, passport, id card, passport address, driving license, address_proof, selfie, liveness, faces or questionnaire. The faces entry is the face matching of the session: it is always present, it comes last, and the session does not pass without it.
results[].statusstringThe status of the step. It is forced to failed whenever errors is not empty.
results[].errorsarray of stringSymbolic error codes of the step. Treat an unknown entry as a failure with an unknown reason.
results[].triesnumberUploads made against the step. Absent when the step was never attempted.
results[].startedAtstring (date-time)The start of the current attempt at the step.
results[].historyarray of objectEarlier attempts at the step, oldest first. Filled from the second upload onwards.
results[].docNamestringThe recognized document, on document steps.
results[].countryCodestringThe issuing country of the recognized document, on document steps.
results[].isBackSidebooleanWhether the image is the back side, on document steps.
results[].ocrstring or objectThe recognized fields of a document or address proof step, or the string Access denied.
results[].checksstring or array of objectThe verification groups run against the step, or the string Access denied.
results[].imagesarray of stringThumbnail links, one per upload attempt.
results[].faceSelfiestringOn a successful selfie step, the face taken from the selfie.
results[].facesarray of stringOn liveness steps, the faces captured during the challenge.
results[].videostringOn liveness steps, the recorded video, present only when it was stored.
results[].triesLeftnumberOn liveness steps, the attempts still available. Zero means the step is over.
results[].verifiedboolean or nullOn liveness steps, whether the verifying services confirmed a live person on the last charged attempt. Null while no attempt has been charged. It is false on an attempt that was judged without them, so a passing attempt can be unverified.
results[].outcomeobject or nullOn liveness steps, how the last attempt ended, including attempts that cost nothing and are therefore invisible in errors and in status. Null before the first commit. outcome.class is one of success, verdict, technical, unverified and exhausted; outcome.code is a reason code in the shape of errors.
results[].attemptsarray of objectOn liveness steps, one entry per charged attempt, oldest first, each with its number, time, class (success, verdict or unverified), code and verified. An attempt that cost nothing leaves no entry.
results[].retakearray of integerOn the faces entry: the positions in results of the steps to shoot again after a failed face matching.

Reading it correctly

  • Branch on status of the session and of each step, never on message text. See response format and errors.
  • A successful status alone does not establish verified liveness. On a liveness step, read verified and outcome.class as well. success means the attempt passed and was verified. unverified means it passed without the verifying services. verdict means it was refused on a judgement about the person and the attempt is spent. technical means the machinery failed and the attempt is given back. exhausted means the budget is gone. Decide in your own flow whether an unverified pass is enough for the customer.
  • A step with errors is failed, whatever else it holds. A session does not pass without the faces entry passing.
  • Media links need the same token header as the API when you fetch them.
  • Verdicts of database checks are not in this object. Read them with database check results.
  • After an erasure request pdErased is true and the personal values are gone. See erase session personal data.

Questions about results?

Write to us and we will help.

Talk to us