Solicitud de Verificación de Identidad

Esta sección se enlistan y describen los endpoints utilizados para realizar un flujo de Verificación de Identidad sin documento

Guía rápida

Para poder usar el flujo de verificación de identidad sin un documento asociado es necesario seguir los siguientes pasos.

Crear una solicitud de verificación de identidad

Este endpoint le permitira solicitar una petición de verificación a una persona, mediante el uso de su correo electrónico

Petición

curl --location 'https://api-sandbox.weetrust.com.mx/identity/validation/request' \
--header 'token: {{TOKEN}}' \
--header 'user-id: {{USER_ID}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "[email protected]",
  "type": "FACE",
  "backgroundCheck": true
}'

Respuesta

{
    "responseData": {
        "url": "https://sandbox.weesign.com.mx/identity/660ac06b0ff74f19aa97e229/1711980651433",
        "validationId": "660ac06b0ff74f19aa97e229"
    },
    "message": "Identity validation requested successfully",
    "success": true,
    "responseCode": 200
}

El enlace devuelto como "url" debe ser enviado al usuario para que este pueda registrar su documento oficial y selfie.

Obtener el estado de una petición de verificación

Mediante este endpoint podrá obtener la información de la verificación si ya fue realizada, también podrá obtener referencias importantes como el customerId que le permite usar la funcionalidad de face_login para firmár un documento con verificación de identidad solamente usando la selfie.

Petición

curl --location 'https://api-sandbox.weetrust.com.mx/identity/validation/request/660ac06b0ff74f19aa97e229' \
--header 'token: {{TOKEN}}' \
--header 'user-id: {{USER_ID}}'

Respuesta

{
    "responseData": {
        "userId": "{{USER_ID}}",
        "emailId": "[email protected]",
        "status": "CREATED",
        "createdAt": "2023-04-01T14:10:51.487Z",
        "sessionId": "660ac06b0ff74f19aa97e229",
        "customerId": "660ac06b0ff74f56aa97e2777",
        "url": "https://sandbox.weesign.com.mx/identity/660ac06b0ff74f19aa97e229/1711980651483",
        "backgroundCheck": true
    },
    "message": "Identity validation requests get successfully",
    "success": true,
    "responseCode": 200
}

Obtener resultados de la verificación

Con este endpoint usted puede obtener los resultados finales del proceso de verificación de identidad.

📘

También puede registrar un webhook para recibir la información sin necesidad de usar este endpoint.


Petición

curl --location 'https://api-sandbox.weetrust.com.mx/identity/session/results/65c17fce2782f4ac0f447cb6' \
--header 'token: {{TOKEN}}' \
--header 'user-id: {{USER_ID}}' 

Respuesta

{
    "responseData": {
        "results": {
            "score": {
                "idValidation": {
                    "overall": {
                        "value": 0.9985910691770603,
                        "status": "OK"
                    }
                },
                "liveness": {
                    "livenessScore": {
                        "value": "",
                        "status": ""
                    },
                    "digitalAttack": {
                        "status": ""
                    },
                    "evasionAttack": {
                        "status": ""
                    },
                    "overall": {
                        "value": 0.9985910691770603,
                        "status": "OK"
                    }
                },
                "faceRecognition": {
                    "maskCheck": {
                        "value": "",
                        "status": ""
                    },
                    "lensesCheck": {
                        "status": ""
                    },
                    "faceBrightness": {
                        "status": ""
                    },
                    "nameMatch": {
                        "status": ""
                    },
                    "overall": {
                        "value": 0.9985910691770603,
                        "status": "OK"
                    }
                },
                "overall": {
                    "value": 0.9985910691770603,
                    "status": "OK"
                }
            },
            "ocr": {
                "name": {
                    "fullName": "PEDRO ABEL GUTIERREZ MIRAMONTES",
                    "lastName": "GUTIERREZ",
                    "firstName": "PEDRO ABEL",
                    "paternalLastName": "GUTIERREZ",
                    "maternalLastName": "MIRAMONTES"
                },
                "address": "AV DEL RINCON 8586 DPTO D\nFRACC MONTES DEL MIRAR 10000",
                "addressFields": {
                    "street": "AV DEL RINCON 8586 DPTO",
                    "colony": "FRACC MONTES DEL MIRAR",
                    "postalCode": "02000",
                    "city": "Azcapotzalco",
                    "state": "DF",
                    "stateCode": "01"
                },
                "exteriorNumber": "",
                "interiorNumber": "",
                "typeOfId": "MX_IDCard_2014",
                "birthDate": 613094400000,
                "gender": "M",
                "claveDeElector": "{{CLAVE_DE_ELECTOR}}",
                "curp": "{{CURP}}",
                "numeroEmisionCredencial": "01",
                "cic": "{{CIC}}",
                "ocr": "{{OCR}}",
                "documentNumber": "{{DOCUMENT_NUMBER}}",
                "permissionType": "",
                "expireAt": "",
                "expirationDate": "31 12 2029",
                "issueDate": "",
                "registrationDate": "2019",
                "issuingCountry": "MEX",
                "birthPlace": "",
                "nationality": "MEX",
                "documentNumberCheckDigit": "",
                "dateOfBirthCheckDigit": "",
                "expirationDateCheckDigit": ""
            }
        },
        "customerId": "660eeab6dadfdbdf0155b8d9c"
    },
    "message": "Obtained reuslts successfully",
    "success": true,
    "responseCode": 200
}

Registrar webhook para petición de verificación

Mediante este endpoint podrá registrar una url, para recibir una notificación cuando sea procesada una solicitud de verificación de identidad.

Petición

curl --location 'https://api-sandbox.weetrust.com.mx/webhooks/verify' \
--header 'user-id: {{USER_ID}}' \
--header 'token: {{TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Verification request identity",
    "type": "VERIFICATION_REQUEST_FINISHED",
    "url": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed"
}'

Respuesta

{
    "responseData": {
        "name": "WebhooksiteIdentity",
        "type": "VERIFICATION_REQUEST_FINISHED",
        "webHookID": "c7fb8b51b9f68045a4b0344ae4286da22fe456456a",
        "webHookUrl": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed",
        "options": []
    },
    "message": "OK",
    "success": true,
    "responseCode": 200
}