Retrieve results and data

The response will detail all information, check and task completion status, resource and media data, along with the associated media identifiers.

Sessions can be retrieved at any time, however the integrating backend will be notified when a session update occurs, according to the notifications settings provided at session creation.

Get Session Request

Before you start
Please see our create a session section

Please note:

  • withMethod should be set to GET
  • The withEndpoint should be set to /sessions/SESSION_ID where SESSION_ID should be replaced with the SESSION_ID obtained at Create a Session.
Javascript
PHP
Python
Java
Go
C#
Ruby
Copy

See below for an example response from the retrieve session endpoint.

Example of a full session retrieval

JSON
Copy

Get Session Response Explained

Retrieved State

Yoti will provide back the following information regarding the state of the session:

  • The state of the session
  • Session ID
  • client_session_token_ttl - will be 0 if expired.
  • user_tracking_id set by the relying business backend
JSON
Copy
StateDescription
ONGOINGYoti is still working on tasks and checks for the user's ID.
COMPLETEDYoti has completed checks and tasks.
EXPIREDYoti could not complete the checks and tasks.
Jump to...
To find out how to create this session please head back to the create a session section.

Retrieved Checks

We provide back the following details for the checks:

  • Type and unique ID
  • Resources used
  • State
  • Report - containing a recommendation and a breakdown of the report.
Response TopicResponseDescription
StateCREATED, READY, PENDING, INTERNAL_ERROR, DONEThe status of the check. If subscribed you will receive a check completion notification when the check is move to a DONE state.
RecommendationAPPROVE, REJECT, NOT_AVAILABLEYoti will provide you a recommendation based on the checks.

ID Document Authenticity

An example of an 'APPROVE' report is shown below, please use the language snippet to see examples of a 'REJECT' and 'NOT_AVAILABLE' report.

JSON
JSON
JSON
Copy

If Yoti responds with the REJECT recommendation there will be a rejection reason alongside this.

  • Missing Hologram
  • Document Copy
  • Tampered
  • Not genuine

If Yoti responds with the NOT AVAILABLE recommendation, this means we were unable to carry out the check. A recovery suggestion will be provided to give the user an idea of what can be done to correct the issue causing the not available recommendation. A full list of possible reasons for this can be found below:

Yoti ResponseDescriptionRecommendation
PHOTO_OVEREXPOSEDThe photo is overexposedNOT_AVAILABLE
PHOTO_TOO_DARKThe photo is darkNOT_AVAILABLE
PHOTO_TOO_BLURRYThe photo is blurryNOT_AVAILABLE
DOCUMENT_TOO_DAMAGEDDocument is too damaged (at the point we cannot check)NOT_AVAILABLE
GLARE_OBSTRUCTIONThe photo has a glareNOT_AVAILABLE
OBJECT_OBSTRUCTIONObject in the wayNOT_AVAILABLE
UNABLE_TO_LOADUnable to load fileNOT_AVAILABLE
PARTIAL_PHOTOThe photo is partially takenNOT_AVAILABLE
IMAGE_RESOLUTION_TOO_LOWThe image resolution is too lowNOT_AVAILABLE
COUNTRY_NOT_SUPPORTEDThe country is not supportedNOT_AVAILABLE
DOCUMENT_NOT_SUPPORTEDYoti does not support this documentNOT_AVAILABLE
INCORRECT_DOCUMENT_TYPEThe document type is incorrectNOT_AVAILABLE
INCORRECT_MRZMRZ on passport is incorrectNOT_AVAILABLE
DOCUMENT_VERSION_NOT_SUPPORTEDYoti does not support this document templateNOT_AVAILABLE
MISSING_DOCUMENT_SIDEThe full document was not sentNOT_AVAILABLE
BLACK_AND_WHITE_IMAGEBlack and white photoNOT_AVAILABLE
MISUSEThe photo has been misusedNOT_AVAILABLE
INVALIDThe photo is not a valid photoNOT_AVAILABLE
DOCUMENT_COPYThe photo has been photocopiedREJECT
NO_HOLOGRAM_MOVEMENTThere is no hologram movement detectedREJECT
TAMPEREDThe photo seems to be tampered withREJECT
MISSING_HOLOGRAMThere is no hologram on the photoREJECT
OTHER_SECURITY_FEATURESExpected data present or data in correct position failed. This will vary document to document, an example of features checked: Microprint, watermarks, optically variable ink, presence of fingerprint / other notable (non-text) features and any visible embossing / engravingREJECT
EXPIRED_DOCUMENTThe document has expiredREJECT
FRAUD_LIST_MATCHThe fraud match list check failedREJECT
Jump to...
To find out how to create this session please head back to the create a session section.

Liveness

Liveness checks can be retried if failed, depending on specified limited set when generating the session. Each try will generate a new report in the JSON response. The check will either be approved or rejected based on the result of the liveness check which is a pass/fail result.

JSON
Copy
Jump to...
To find out how to create this session please head back to the create a session section.

ID Document Face Match

An ID_DOCUMENT_FACE_MATCH check will return a report containing an overall recommendation, and the breakdown of sub checks performed (the result of the machine (AI) face match, and/or the manual face match, according to which were performed).

If an AI face match is performed, a pass/fail result is returned, along with a confidence score (between 0 and 1) depending on how successful the match is, Yoti offers a PASS score if the confidence score is over 0.7.

A manual check will be either a pass or a fail.

The face match check will give a recommendation based on these as either APPROVE or REJECT.

JSON
Copy

The below responses are only for manual checks:

Yoti ResponseDescriptionRecommendation
PHOTO_OVEREXPOSEDThe photo is overexposedNOT_AVAILABLE
PHOTO_TOO_DARKThe photo is darkNOT_AVAILABLE
PHOTO_TOO_BLURRYThe photo is blurryNOT_AVAILABLE
FACE_NOT_FOUNDNo face detectedNOT_AVAILABLE
GLARE_OBSTRUCTIONThe photo has a glareNOT_AVAILABLE
OBJECT_OBSTRUCTIONObject in the wayNOT_AVAILABLE
DOCUMENT_NOT_FOUNDNo photo detectedNOT_AVAILABLE
PARTIAL_PHOTOOnly part of the photo was shownNOT_AVAILABLE
FACE_PHOTO_LOW_RESOLUTIONThe photo had low resolutionNOT_AVAILABLE
MISUSEThe photo is misusedNOT_AVAILABLE
INVALIDThe photo is invalidNOT_AVAILABLE
FACE_NOT_GENUINEThe face shown is not genuineREJECT
LARGE_AGE_GAPThe age gap looks unrealisticREJECT
DOCUMENT_COPYThe document has been photocopiedREJECT
TAMPEREDThe photo has been tamperedREJECT
PHOTO_OF_MASKThe user is wearing a maskREJECT
PHOTO_OF_PHOTOThe photo has been photocopiedREJECT
DIFFERENT_PERSONDifferent person is detected from ID.REJECT
Jump to...
To find out how to create this session please head back to the create a session section.

ID Document Text Data Check

This check is generated by the ID Document Text Data Extraction task (see below). This will only be generated if the "manual_check" is set to ALWAYS or FALLBACK. This check is performed by our security centre to manually check that the automatic text data extraction was correct or to perform the extraction if the automatic task fails.

JSON
Copy

The ID Document Text Data check will give a recommendation either APPROVE or REJECT. The recommendation will come with a breakdown which will contain the subcheck text_data_readable which will either be a PASS or a FAIL.

If this check is successfully approved then the generated media array will contain the extracted text media ID, which can be used to retrieve the JSON object with the extracted data.

This media will replace the "document_fields" media in the resources. Details of this can be found here: retrieved resources.

Retrieved Tasks

ID Document Text Data Extraction

An ID_DOCUMENT_TEXT_DATA task will return a state and a JSON. See Retrieved resources section for more detail.

JSON
Copy

If Yoti responds with the NOT AVAILABLE recommendation, this means we were unable to carry out the check. A recovery suggestion will be provided to give the user an idea of what can be done to correct the issue causing the not available recommendation. A full list of possible reasons for this can be found below:

Yoti responseDescriptionRecommendation
PHOTO_OVEREXPOSEDThe photo is overexposedNOT_AVAILABLE
PHOTO_TOO_DARKThe photo is darkNOT_AVAILABLE
PHOTO_TOO_BLURRYThe photo is blurryNOT_AVAILABLE
DOCUMENT_TOO_DAMAGEDDocument is too damaged (at the point we cannot check)NOT_AVAILABLE
GLARE_OBSTRUCTIONThe photo has a glareNOT_AVAILABLE
OBJECT_OBSTRUCTIONObject in the wayNOT_AVAILABLE
UNABLE_TO_LOADUnable to load fileNOT_AVAILABLE
PARTIAL_PHOTOThe photo is partially takenNOT_AVAILABLE
IMAGE_RESOLUTION_TOO_LOWThe image resolution is too lowNOT_AVAILABLE
COUNTRY_NOT_SUPPORTEDThe country is not supportedNOT_AVAILABLE
DOCUMENT_NOT_SUPPORTEDYoti does not support this documentNOT_AVAILABLE
INCORRECT_DOCUMENT_TYPEThe document type is incorrectNOT_AVAILABLE
INCORRECT_MRZMRZ on passport is incorrectNOT_AVAILABLE
DOCUMENT_VERSION_NOT_SUPPORTEDYoti does not support this document templateNOT_AVAILABLE
MISSING_DOCUMENT_SIDEThe full document was not sentNOT_AVAILABLE
BLACK_AND_WHITE_IMAGEBlack and white photoNOT_AVAILABLE
MISUSEThe photo has been misusedNOT_AVAILABLE
INVALIDThe photo is not a valid photoNOT_AVAILABLE
Jump to...
To find out how to create this session please head back to the create a session section.

Get Media Request

For security reasons, we do not include personally identifiable information (PII) within the standard response to a session retrieval request. Rather, we provide pointers to 'media' associated with the session, which are stored and can be retrieved separately. Examples of media are: document images, structured fields extracted from a document, face images, and so on.

Using the media IDs contained within the response to a GET session request, you can retrieve the associated media using the session ID and media ID.

Please note the:

  • withMethod should be set to GET
  • The withEndpoint should be set to /sessions/SESSIONID/media/MEDIA ID/content where SESSION_ID should be replaced with the SESSION_ID obtained at Create a Session.
  • MEDIA_ID should be replaced with the MEDIA_ ID obtained at session retrieval.
Javascript
PHP
Python
Java
Go
C#
Ruby
Copy

The response will be returned as a JSON object and image media will be returned as a buffer string.

Knowledge base
Retrieving media for Aadhaar is slightly different, for more information see the section linked.

Session & Media Deletion

It is possible to delete a session or session media before the defined retention period (ttl) is over. However, this can only be done once the session is completed. Deleting the session will also delete all media from that session. Deleting a media object will delete only that specific object, leaving the rest of the session untouched.

Good to know...
Please note that the session, along with all associated resources and media, will be automatically deleted once the retention period (defined in the session creation) is reached.

For more information about DELETE requests see our API references

Session Deletion

  • withMethod should be set to DELETE
  • The withEndpoint should be set to /sessions/SESSION_ID where SESSION_ID should be replaced with the SESSION_ID obtained in Create a Session.
Javascript
PHP
Python
Java
Go
C#
Ruby
Copy

Media Deletion

Please note the:

  • withMethod should be set to DELETE
  • The withEndpoint should be set to /sessions/SESSION_ID/media/MEDIA_ID/content where SESSION_ID should be replaced with the SESSION_ID obtained in Create a Session and MEDIA_ID should be replaced with the MEDIA_ID obtained in the get session request.
Javascript
PHP
Python
Java
Go
C#
Ruby
Copy

Retrieved Resources

The resources retrieval returns back details and resources of the id document and liveness check depending on what tasks and checks you request.

ID Document Resources

When the session is retrieved there will be details regarding the ID document and associated tasks.

JSON
Copy
Response TopicExample ResponseDescription
id89eab361-7d91-42c5-a833-06a212cwfdb2ID of the document. In UUID form.
tasksN/AInformation on any tasks requested.
document_typeDRIVING LICENSEType of document scanned - this is selected by the user before uploading their document. We support, passports, driving licenses and citizen cards of select countries. For a list of supported documents see here.
issuing_countryGBRIssuing country of the document - this is selected by the user before uploading their document. Will be in 3 letter ISO country code format.
pagesN/APages of document - will be multiple if user is required to upload a front and back image of their document. Generated media and capture_method are provided here.
document_fieldsN/AIf the task ID_DOCUMENT_TEXT_DATA_EXTRACTION is requested then the generated media containing the extracted data will be presented here.
Jump to...
To find our how to create this session please head back to the task section.

Liveness Capture Resources

If a liveness check is requested then it will generate resources.

JSON
Copy
Response TopicDescription
idA unique ID in UUID form.
tasksAny tasks performed on the liveness capture.
framesMedia generated during the liveness check.
liveness_typeType of liveness.
facemapIf a facemap is generated the media data is provided here.

Document fields explained

This is the JSON version of the user.

Explanation of the address format can be found here

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard