Attempts

In 2Face, attempts are the result of a session whether it as successful or not. They are attempts of authentication and as the sessions we have 2 types: signup and validation.

This sections shows the endpoints that can be used to get the information of certain attempts that fail, check their status and operate on them.

Get by ID

GET https://api.tagshelf.com/v1/2face/attempts/:id

Gets the information of an attempt by its ID

Path Parameters

Name
Type
Description

id*

string

id of the requested user.

Headers

Name
Type
Description

Authorization*

string

API Key

User-Agent*

string

User Agent

{
  "code": 200,
  "result": {
            "_id": "6278d033f48241fc3a60cd7d",
            "type": "VALIDATION",
            "faces": [],
            "stages": [
                {
                    "name": "fetch_document_data",
                    "input": {
                        "document_type": "CEDULA",
                        "document_url": "<url>"
                    },
                    "result": {
                        "status": "COMPLETED",
                        "output": {
                            "data": {}
                        }
                    }
                }
            ],
            "status": "PENDING",
            "createdAt": "2022-05-09T08:26:27.327Z",
            "updatedAt": "2022-05-09T08:30:12.472Z",
            "id": "6278d033f48241fc3a60cd7d"
}

Review Attempt

POST https://api.tagshelf.com/v1/2face/attempts/review/:id

Change the status of an attempt that was previously marked for manual review.

Path Parameters

Name
Type
Description

id*

string

Id of the Attempt

Headers

Name
Type
Description

Authorization*

string

API Key

User-Agent*

string

User Agent

Request Body

Name
Type
Description

status*

String

status of the attempt. Accepted values: CANCELLED | FAILED | SUCCESS

{
  "code": 200,
  "result": "62a736d6de4b359377f73450" //Attempt ID
}

Manual Reviews

If you wish to manually review an attempt you can do it from the Backoffice panel and can set up a webhook to get notified of status changes on attempts.

Attempt Status

During their life-cycle, attempts go through a series of status. Each status means something in the verification process.

PENDING (In Progress): The attempt's session has been created and has not been completed.

ABANDONED: The user did not completed the required stages of the processing pipeline and the session expired.

FAILED: The user started the processing pipeline and the attempt could not complete one of the stages and was marked as failed by 2FACE.

SUCCESS: The user finished the required stages of the processing pipeline and the attempt was marked as successful by 2FACE.

REVIEW (Manual review): The user started the processing pipeline and the attempt's results did not meet the client's conditions. At this moment the attempt must follow a manual verification process.

EXPIRED: The session attempt expired without starting the processing pipeline.

Last updated

Was this helpful?