โ˜‘๏ธReturn Identity Document Validation

Validate whether the information provided for the Customer such as First Name, Last Name and ID Number is an accurate match for what can be read off of the ID Document uploaded.

Please note that the customer's name has to be correct as per their ID Document for the validation to pass (return true). If the person has a Middle Name on their ID Document, you will need to create or update their customer record as such for the the validation to pass.

Return Identity Document Validation

GET {{baseUrl}}/identity-documents/:identity_id/validate

Run this request to get the results of the Validation of the Customer's ID Document against the information stored for the Customer from when they were initially created.

Path Parameters

```json
{
    "data": {
        "id": "bb5dc0d3-8fa3-4856-a477-85d2eef75b70",
        "type": "id_card",
        "front": {
            "id": 28,
            "name": "Mike_IDCard_Front.jpeg",
            "type": "jpg",
            "url": "https://dev.apply.fincheck.co.za/gathr-docs/documents/Mike_IDCard_Front.jpeg"
        },
        "back": {
            "id": 30,
            "name": "MIke_ID_Card_Back.jpeg",
            "type": "jpg",
            "url": "https://dev.apply.fincheck.co.za/gathr-docs/documents/MIke_ID_Card_Back.jpeg"
        },
        "valid": true
    }
}
```

Interpreting the Response

If you receive "valid": true, in the response, the First Name (and Middle Name), Last name and the ID number from the customer_id matches what has been read from the uploaded ID Document.

```json
{
    "data": {
        "id": "{{identityId}}",
        "type": "id_card",
        "front": {
            "id": 28,
            "name": IDCard_Front.jpeg",
            "type": "jpg",
            "url": "https://dev.apply.fincheck.co.za/gathr-docs/documents/IDCard_Front.jpeg"
        },
        "back": {
            "id": 30,
            "name": "ID_Card_Back.jpeg",
            "type": "jpg",
            "url": "https://dev.apply.fincheck.co.za/gathr-docs/documents/ID_Card_Back.jpeg"
        },
        "valid": true
    }
}
```

If one or all of the names (First Name or Middle Name or Last Name) from the customer_id differs from the what has been read from the ID Document, then you will receive the following error response:

```json
{
    "errors": [
        {
            "code": "identity_document_validation",
            "message": "{\"front\":{\"0\":\"first_name_valid\",\"message\":\"The name on your document doesn't match the name you've provided.\"}}"
        }
    ]
}
```// Some code

If the ID number on the customer_id differs from the ID number that has been read from the ID document, then you will receive the following error response:

```json
{
    "errors": [
        {
            "code": "identity_document_validation",
            "message": "{\"front\":{\"0\":\"first_name_valid\",\"message\":\"The name on your document doesn't match the name you've provided.\"}}"
        }
    ]
}
```

Last updated