Title
Create new category
Edit page index title
Edit category
Edit link
Configure IDP Sandbox Response
Instead of relying on the Yoti default sandbox response, integrators can configure which checks pass or fail and specify the failure reasons within a session. This is done using an object that includes defined task_results and check_reports. These failure reasons will then be mapped to the correct requirements_not_met failure reason.
Endpoint
xxxxxxxxxxhttps://api.yoti.com/sandbox/idverify/v1/sessions/{sessionId}/response-configCode examples
xxxxxxxxxxconst { RequestBuilder, Payload } = require("yoti"); const request = new RequestBuilder() .withBaseUrl("https://api.yoti.com/sandbox/idverify/v1") .withPemFilePath("<YOTI_KEY_FILE_PATH>") .withEndpoint("/sessions/<SESSION_ID>/response-config") .withPayload(new Payload(RESPONSE_CONFIG)) .withMethod("PUT") .withQueryParam("sdkId", "<YOTI_CLIENT_SDK_ID>") .build(); //get Yoti responseconst response = request.execute();Example response configuration
xxxxxxxxxx{ "task_results": { "ID_DOCUMENT_TEXT_DATA_EXTRACTION": [ { "result_template": "SUCCESS" } ] }, "check_reports": { "ID_DOCUMENT_AUTHENTICITY": [ { "result": { "report_template": "SUCCESS" } } ], "ID_DOCUMENT_FACE_MATCH": [ { "result": { "report_template": "SUCCESS" } } ], "LIVENESS": [ { "liveness_type": "STATIC", "response_delay": 5, "result": { "report_template": "SUCCESS" } } ], "THIRD_PARTY_IDENTITY_FRAUD_1": { "result": { "report_template": "SUCCESS" } } }}On completion of this API request, you will simply receive a 200 response.
In the sandbox you can configure both successful outcomes and unsuccessful outcomes of checks & tasks to mock multiple different scenarios and different aborted reasons. The below tables outlines the different scenarios that can be mocked.
Tasks
| Task | Report Template | Description | Aborted Reason |
|---|---|---|---|
| ID_DOCUMENT_TEXT_DATA_EXTRACTION | SUCCESS | This simulates a successful automated data extraction task. | N/A |
| ID_DOCUMENT_TEXT_DATA_EXTRACTION | UNSUPPORTED_DOCUMENT * | This simulates an unsuccessful automated data extraction task. | MANDATORY_DOCUMENT_NOT_PROVIDED |
| ID_DOCUMENT_TEXT_DATA_EXTRACTION | DOCUMENT_IS___EXPIRED * | This simulates an unsuccessful automated data extraction task. | MANDATORY_DOCUMENT_NOT_PROVIDED |
| ID_DOCUMENT_TEXT_DATA_EXTRACTION | UNABLE_TO_OCR * | This simulates an unsuccessful automated data extraction task. | MANDATORY_DOCUMENT_NOT_PROVIDED |
*The text extraction task has multiple attempts, so multiple Report Template reasons will need to be added to the array in order to abort the session
Checks
| Check | Report Template | Description | Aborted Reason |
|---|---|---|---|
| ID_DOCUMENT_AUTHENTICITY | SUCCESS | This simulates a "APPROVE" outcome for the document authenticity check | N/A |
| ID_DOCUMENT_AUTHENTICITY | TAMPERED | This simulates a "REJECT" outcome for the document authenticity check, due to a fraudulent document. | FRAUD_DETECTED |
| ID_DOCUMENT_AUTHENTICITY | PHOTO_TOO_BLURRY | This simulates a "NOT_AVAILABLE" outcome for the document authenticity check, due a blurry image. | UNABLE_TO_VALIDATE_DOCUMENT |
| ID_DOCUMENT_FACE_MATCH | SUCCESS | This simulates a "APPROVE" outcome for the face match check. | N/A |
| ID_DOCUMENT_FACE_MATCH | AUTO_FAIL | This simulates a "fail" outcome for the automated face match check. However the overall face match check is still an "APPROVE" due to the manual check passing. | N/A |
| ID_DOCUMENT_FACE_MATCH | MANUAL_FAIL | This simulates a "REJECT" outcome for the face match check. With the manual sub check failing. | FRAUD_DETECTED |
| LIVENESS | SUCCESS | This simulates a "APPROVE" outcome for the liveness check. | N/A |
| LIVENESS | FAIL | This simulates a "REJECT" outcome for the liveness check. | MISSING_LIVENESS |
| THIRD_PARTY_IDENTITY | SUCCESS | This simulates a "APPROVE" outcome for the third party identity check. | N/A |
| THIRD_PARTY_IDENTITY | NO_PROPERTIES_MATCHED | This simulates a "REJECT" outcome for the third party identity check. | IDENTITY_CHECK_FAILED |
| THIRD_PARTY_IDENTITY_FRAUD_1 | SUCCESS | This simulates a "APPROVE" outcome for the identity fraud check. | N/A |
| THIRD_PARTY_IDENTITY_FRAUD_1 | FAIL | This simulates a "REJECT" outcome for the identity fraud check. | FRAUD_DETECTED |
| FACE_COMPARISON | SUCCESS | This simulates a "APPROVE" outcome for the face comparison check. | N/A |
Got a question? Contact us here.