# User verification

```
STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.net
```

## verification update

<mark style="color:green;">`POST`</mark> `https://switch-api-staging.herokuapp.com/user/verification/update`

This endpoint allows you to update user verification information.

#### Headers

| Name        | Type   | Description                                                           |
| ----------- | ------ | --------------------------------------------------------------------- |
| auth\_token | string | the format for **auth\_token** is **Bearer&#x20;*****token\_string*** |

#### Request Body

| Name                            | Type   | Description                                                                                                                |
| ------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| next\_of\_kin\_email\_address   | string | Next of Kin's email address                                                                                                |
| next\_of\_kin\_phone\_number    | string | Next of Kin's Phone number                                                                                                 |
| next\_of\_kin\_relationship     | string | user's relationship with next of kin                                                                                       |
| next\_of\_kin\_name             | string | Name of Next of Kin                                                                                                        |
| nearest\_landmark               | string | Nearest Landmark to user's address                                                                                         |
| nigerian\_contact\_name         | string | Name of Nigerian contact. Required if diaspora user.                                                                       |
| nigerian\_contact\_phone        | string | Phone number of Nigerian contact. Required if diaspora user.                                                               |
| nigerian\_contact\_address      | string | Address of Nigerian contact. Required if diaspora user                                                                     |
| nigerian\_contact\_relationship | string | Relationship between user and Nigerian contact. Required if diaspora user                                                  |
| address                         | string | user's address                                                                                                             |
| state                           | string | user's state of residence                                                                                                  |
| city                            | string | user's city of residence                                                                                                   |
| zipcode                         | string | user's zipcode                                                                                                             |
| bvn                             | string | User's bvn. Optional for diaspora users                                                                                    |
| photo\_id\_number               | string | number of photo id                                                                                                         |
| photo\_id\_expiry               | string | expiry date of photo id                                                                                                    |
| photo\_id\_issuer               | string | photo id issuer (valid values: ***drivers\_license, voters\_card, international\_passport*** and ***national\_id\_card***) |
| photo\_id\_url                  | string | url of the image containing user photo it                                                                                  |
| signature\_url                  | string | url of the image containing user signature                                                                                 |
| image\_selfie\_url              | string | url of image selfie                                                                                                        |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
    "message": "verification information updated successfully"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "message": "Error occurred verifying BVN",
    "errors": {
        "bvn": "BVN is invalid, please confirm your bvn and try again"
    }
}
```

{% endtab %}
{% endtabs %}

## Request verification

<mark style="color:green;">`POST`</mark> `https://switch-api-staging.herokuapp.com/user/verification/process`

This endpoint makes a request for verification

#### Headers

| Name        | Type   | Description                                                           |
| ----------- | ------ | --------------------------------------------------------------------- |
| auth\_token | string | The format for **auth\_token** is **Bearer&#x20;*****token\_string*** |

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

```
{
    "message": "verification request sent successfully"
}
```

{% endtab %}
{% endtabs %}

## Get Verification Progress

<mark style="color:blue;">`GET`</mark> `https://switch-api-staging.herokuapp.com/user/verification/progress`

This endpoint retrieves user verification progress

#### Headers

| Name        | Type   | Description                                                           |
| ----------- | ------ | --------------------------------------------------------------------- |
| auth\_token | string | The format for **auth\_token** is **Bearer&#x20;*****token\_string*** |

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

```
{  
   "message": "Verification progress retrieved successfully",
   "data": {  
      "current": 20,
      "fields": {  
         "bvn": null,
         "full_address": null,
         "photo_id_url": null,
         "signature_url": null,
         "image_selfie_url": "image_selfie_url_IMG_2026.jpg"
      }
   }
}
```

{% endtab %}
{% endtabs %}
