---
title: Verification API
slug: v2/x_gT-verification-api
description: Learn how to verify driving licenses using an API and categorize the results as successful or unsuccessful. This document includes instructions, sample cURL commands, input parameters, and response samples for both preproduction and production environment
createdAt: 2022-09-15T07:43:09.000Z
---

## Introduction

This API verifies the Driving Licence and Displays output in two categories.It displays positve message for successful DL verification along with other parameters and displays negative message for unsuccessful verification.

## How to call the API&#x20;

Before going for  Verification calls, you first need to create an Identity object. Need to pass accessToken and itemid obtained from identity call along with other input parameters. Other input parameters include DL Number, Date of Issue, Date of Birth.

## API Input Guidelines

A valid Dl number should be passed as a value along with name and the date in dd/mm/yyyy format.

## Step 1: Hit Identities API

### Sample cURL

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/..patronId../identities' \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data-raw '{
  "type": "drivingLicence",
  "email": "<email Id>",
  "callbackUrl": "<call Back Url>" 
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://signzy.tech/api/v2/patrons/..patronId../identities' \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data-raw '{
  "type": "drivingLicence",
  "email": "<email Id>",
  "callbackUrl": "<call back Url>" 
}'
```
:::
::::

### Input Parameters

| **Parameter Name** | **Required/Optional** | **Description**                                        |
| ------------------ | --------------------- | ------------------------------------------------------ |
| Authorization      | Required              | Contains the id parameter returned from the login step |
| Content-Type       | Required              | application/json                                       |
| type               | Required              | Type of identity                                       |
| email              | Required              | e-mail ID                                              |
| callbackurl        | Required              | URL where response will be posted                      |

***

### Sample Response&#x20;

```json
{
    "type": "drivingLicence",
    "email": "ankur.rand@signzy.com",
    "callbackUrl": "",
    "accessToken": "",
    "autoRecognition": [],
    "verification": [],
    "forgeryCheck": [],
    "id": "",
    "patronId": ""
}
```

### Response Parameter

| **Parameter Name** | **Description**                        |
| ------------------ | -------------------------------------- |
| type               | type of ID                             |
| email              | email id                               |
| callbackUrl        | url which holds output                 |
| accessToken        | This is provided by identities API     |
| autoRecognition    | Auto recognises text from upload image |
| verification       | verification is done                   |
| forgeryCheck       | Forgery check is done                  |
| id                 | Unique user id                         |
| patronId           | Unique patron id                       |



## Step 2: Hit Snoops API and receives a response

### Sample cURL

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://preproduction.signzy.tech/api/v2/snoops' \
--header 'Content-Type: application/json' \
--data-raw '{ "service": "Identity",
  "itemId": "",
  "task": "verification",
  "accessToken": "",
  "essentials": {
  	    "number":"",
        "dob":"",
        "issueDate":""
        }
} '
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://preproduction.signzy.tech/api/v2/snoops' \
--header 'Content-Type: application/json' \
--data-raw '{ "service": "Identity",
  "itemId": "",
  "task": "verification",
  "accessToken": "",
  "essentials": {
  	    "number":"",
        "dob":"",
        "issueDate":""
        }
} '
```
:::
::::

### Input Parameters

| **Parameter Name**   | **Required/Optional** | **Description**                                                |
| -------------------- | --------------------- | -------------------------------------------------------------- |
| Content-Type         | Required              | application/json                                               |
| Authorization        | Required              | Authorization token                                            |
| service              | Required              | Type of Signzy service - “identity”                            |
| itemId               | Required              | Contains the identity item id                                  |
| accessToken          | Required              | This is provided by the identities API                         |
| task                 | Required              | The task need to be performed (i.e. verification in this case) |
| essentials           | Required              | Contains the essential output data                             |
| essentials.number    | Required              | DL Number                                                      |
| essentials.dob       | Required              | Date of birth of the DL holder                                 |
| essentials.issueDate | Optional              | Date of issue of DL                                            |

### Sample API Responses

::::Tabs
:::Tab{title="Positive Response"}
```json
{
    "service": "Identity",
    "itemId": "",
    "task": "verification",
    "essentials": {
        "number": "",
        "dob": "",
        "issueDate": "",
        "instance": {
            "id": "",
            "callbackUrl": ""
        }
    },
    "accessToken": "",
    "id": "",
    "response": {
        "number": "",
        "dob": "",
        "issueDate": "",
        "instance": {
            "id": "",
            "callbackUrl": ""
        },
        "id": 1,
        "result": {
            "verified": true,
            "message": "Driving licence verification process completed successfully with positive result.",
            "moreInfo": {
                "issueDate": "",
                "expiryDate": "",
                "vehicleClass": [
                    "MCWG",
                    "LMV"
                ]
            }
        }
    }
}

 
```
:::

:::Tab{title="Negative Response"}
```json
//For negative Result
 "result": {
            "verified": false,
            "message": "Driving licence verification process completed successfully with negative result."
        }
```
:::
::::

### Output Parameters

::::Tabs
:::Tab{title="Positive response"}
| **Parameter Name**                    | **Description**                                                        |
| ------------------------------------- | ---------------------------------------------------------------------- |
| service                               | Type of Signzy service - “identity”                                    |
| itemId                                | Contains the identity item id                                          |
| task                                  | The type of task performed - “Auto Recognition”                        |
| essentials                            | Contains the essential output data                                     |
| essentials.number                     | DL number                                                              |
| essentials.dob                        | Date of birth of Licence holder                                        |
| essentials.issueDate                  | Date of issue of the Driving Licence                                   |
| essentials.instance.id                | It contains instance id value                                          |
| essentials.instance.callbackUrl       | It contains url where the output will be posted.                       |
| accessToken                           | Contains the access token that was received<br />from identity request |
| id                                    | Contains the unique Id of the snoop request                            |
| response                              | Contains the output files                                              |
| response.dob                          | Date of birth of licence holder.                                       |
| response.issueDate                    | Date of issue of licence                                               |
| instance.id                           | It contains instance id value                                          |
| instance.callbackUrl                  | Url where output is stored                                             |
| response.id                           | It contains response id value                                          |
| response.result.verified              | It displays the status of <br />verification (i.e. true/false)         |
| response.result.message               | Displays result message                                                |
| response.result.moreInfo.issueDate    | Date of issue of Licence                                               |
| response.result.moreInfo.expiryDate   | Date of expiry of Licence                                              |
| response.result.moreInfo.vehicleClass | It displays the type of vehicle for which licence issued               |
:::

:::Tab{title="Negative response"}
| **Parameter Name** | **Description**                           |
| ------------------ | ----------------------------------------- |
| result.verified    | False if the verification is unsucessful  |
| result.message     | Message showing the negative result       |
:::
::::

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](mailto\:help@signzy.com).
:::

