# Virtual NIN (vNIN)

{% hint style="info" %}
Please note that when using your test key, Our test persona is **John Doe** and his vNIN is **JZ426633988976CH.** Hence all matching done with your test keys with details other than our Test Persona would simulate a failed identity matching.
{% endhint %}

{% hint style="success" %}
3\. Please note that the applicant needs to generate the virtual NIN by themselves on the NIMC mobile app in other to use this endpoint.&#x20;

They will need Verifyme's shortCode to generate the vNIN successfully, the short-code is **715461**
{% endhint %}

{% hint style="info" %}
**Generate vNIN via USSD** &#x20;

Dial \*346\* 3\* Your NIN\* AgentCode# \
An SMS message will be sent back to you containing the Virtual NIN generated for you.
{% endhint %}

{% hint style="info" %}

**Steps to generate vNIN through the NIMC app**&#x20;

1. Download the NIMC App
2. Click on "Get Virtual NIN"
3. Select "Input Enterprise short-code" and type 715461
4. Click "Submit" and your virtual NIN will be generated.
   {% endhint %}

#### John Doe's matching test&#x20;

```
ID_SAMPLE = {
    idNumber: 'JZ426633988976CH',
    firstname: 'John',
    lastname: 'Doe',
    dob: '04-04-1944',
    gender: 'male',
    phone: '+2348000000001'
}
```

{% tabs %}
{% tab title="JSON" %}

```
{
    "firstname": "JOHN",
    "lastname": "Doe"
}
```

{% endtab %}

{% tab title="CURL" %}

```


curl --location --request POST 'https://vapi.verifyme.ng/v1/verifications/identities/virtual-nin/JZ426633988976CH' \
--header 'Authorization: Bearer {your secret key}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "firstname": "JOHN",
    "lastname": "DOe"
}
'
```

{% endtab %}
{% endtabs %}

## Virtual NIN

<mark style="color:green;">`POST`</mark> `https://vapi.verifyme.ng/v1/verifications/identities/virtual-nin/:vNin`

This endpoint is for verifying a customer's identity using their uniquely generated Virtual NIN (vNIN). The vNIN is generated from NIMC's mobile app and is tied to our Merchant ID.

#### Path Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| vNin<mark style="color:red;">\*</mark> | string | Virtual Nin |

#### Headers

| Name                                            | Type   | Description          |
| ----------------------------------------------- | ------ | -------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Authorization Header |

#### Request Body

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| firstname | string | First name    |
| phone     | String | Phone number  |
| dob       | String | Date of birth |
| lastname  | String | Last name     |
| gender    | String | Gender        |

{% tabs %}
{% tab title="201: Created Success response" %}

```
{
    "status": "success",
    "data": {
        id: 1,
        firstname: 'John',
        lastname: 'Doe'
        birthdate: idSample.dob,
        gender: 'M',
        phone: '2341234567890',
        vNin: 'JZ426633988976CH',
        photo: 'https://verifyme-assets.s3.eu-west-2.amazonaws.com/placeholder.png'
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized Error" %}

```
{
    "statusCode": 401,
    "error": "Unauthorized"
}
```

{% endtab %}

{% tab title="404: Not Found vNIN not found" %}

```
{
    "code":"NOT_FOUND_ERROR",
    "message":"vNin provided is not found. Please provide a valid vNIN"
}
```

{% endtab %}
{% endtabs %}
