---
title: Fetch API
slug: v2-apis/X9xx-fetch-api
description: Learn how to fetch driving license data using our API. Log in, obtain an access token, and use it as an authorization header in your API request. This document includes sample CURL commands, details about request and response parameters, like license numb
createdAt: 2022-09-19T07:28:09.000Z
---

# Introduction

This API helps to fetch the data by providing a DL number simply.

## How to call the API

You will need to [login](https://docs.signzy.com/sandboxapis) before sending  request. You are required to pass the access token received from the login call, as authorization header in the Fetch API request.

## API Input Guidelines

Need to provide a valid DL number.

## Sample Curl

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/patrons/drivingLicenceV2",
  "name": "Driving Licence Fetch",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "children": [],
        "description": "Contains the id parameter returned from the login step"
      },
      {
        "kind": "required",
        "name": "content-type",
        "type": "string",
        "children": [],
        "description": "Application/JSON"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "task",
        "type": "string",
        "description": "fetch data from DL"
      },
      {
        "kind": "required",
        "name": "essentials",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "number",
            "type": "string",
            "description": "Conatins DL Number"
          },
          {
            "kind": "optional",
            "name": "dob",
            "type": "string",
            "description": "Contains date of birth of the DL holder"
          },
          {
            "kind": "optional",
            "name": "issueDate",
            "type": "string",
            "description": "Contains date of issue of DL"
          }
        ],
        "description": "Contains essential input data"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "Ss6_0jV1qM1kHjBo6lTdr",
        "code": "{\r\n    \"essentials\": {\r\n        \"number\": \"MH122013002xxxx\",\r\n        \"dob\": \"21/12/1991\",\r\n        \"issueDate\": \"28/03/2013\"\r\n    },\r\n    \"id\": \"633538290b9e46d4a04xxxxx\",\r\n    \"patronId\": \"6319d81fa341350e797d4xxx\",\r\n    \"task\": \"fetch\",\r\n    \"result\": {\r\n        \"dlNumber\": \"MH1220130021xxx\",\r\n        \"dob\": \"21/12/1991\",\r\n        \"badgeDetails\": [\r\n            {\r\n                \"badgeIssueDate\": \"\",\r\n                \"badgeNo\": \"\",\r\n                \"classOfVehicle\": [\r\n                    \"LMV\",\r\n                    \"MCWG\"\r\n                ]\r\n            }\r\n        ],\r\n        \"dlValidity\": {\r\n            \"nonTransport\": {\r\n                \"to\": \"27/03/2033\",\r\n                \"from\": \"28/03/2013\"\r\n            },\r\n            \"hazardousValidTill\": \"\",\r\n            \"transport\": {\r\n                \"to\": \"\",\r\n                \"from\": \"\"\r\n            },\r\n            \"hillValidTill\": \"\"\r\n        },\r\n        \"detailsOfDrivingLicence\": {\r\n            \"dateOfIssue\": \"28/03/2013\",\r\n            \"dateOfLastTransaction\": \"\",\r\n            \"status\": \"\",\r\n            \"lastTransactedAt\": \"\",\r\n            \"name\": \" \",\r\n            \"fatherOrHusbandName\": \" \",\r\n            \"addressList\": [\r\n                {\r\n                    \"completeAddress\": \" \",\r\n                    \"type\": \"permanent\",\r\n                    \"splitAddress\": {\r\n                        \"district\": [\r\n                            \"PUNE\"\r\n                        ],\r\n                        \"state\": [\r\n                            [\r\n                                \"MAHARASHTRA\",\r\n                                \"MH\"\r\n                            ]\r\n                        ],\r\n                        \"city\": [\r\n                            \"PUNE CITY\"\r\n                        ],\r\n                        \"pincode\": \"411011\",\r\n                        \"country\": [\r\n                            \"IN\",\r\n                            \"IND\",\r\n                            \"INDIA\"\r\n                        ],\r\n                        \"addressLine\": \" \"\r\n                    }\r\n                },\r\n                {\r\n                    \"completeAddress\": \" \",\r\n                    \"type\": \"temporary\",\r\n                    \"splitAddress\": {\r\n                        \"district\": [\r\n                            \"PUNE\"\r\n                        ],\r\n                        \"state\": [\r\n                            [\r\n                                \"MAHARASHTRA\",\r\n                                \"MH\"\r\n                            ]\r\n                        ],\r\n                        \"city\": [\r\n                            \"PUNE CITY\"\r\n                        ],\r\n                        \"pincode\": \"411011\",\r\n                        \"country\": [\r\n                            \"IN\",\r\n                            \"IND\",\r\n                            \"INDIA\"\r\n                        ],\r\n                        \"addressLine\": \"216,MANGALWAR PETH\"\r\n                    }\r\n                }\r\n            ],\r\n            \"address\": \" \",\r\n            \"photo\": \"https://persist.signzy.tech/api/files/422826035/download/4c409734922549d0a4997f23bfb5ea9acad651759b834e22a9a5ff0872d5xxxx.jpeg\",\r\n            \"splitAddress\": {\r\n                \"district\": [\r\n                    \"PUNE\"\r\n                ],\r\n                \"state\": [\r\n                    [\r\n                        \"MAHARASHTRA\",\r\n                        \"MH\"\r\n                    ]\r\n                ],\r\n                \"city\": [\r\n                    \"PUNE CITY\"\r\n                ],\r\n                \"pincode\": \"411011\",\r\n                \"country\": [\r\n                    \"IN\",\r\n                    \"IND\",\r\n                    \"INDIA\"\r\n                ],\r\n                \"addressLine\": \" \"\r\n            },\r\n            \"covDetails\": []\r\n        }\r\n    }\r\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Ss6_0jV1qM1kHjBo6lTdr"
  },
  "examples": {
    "languages": [
      {
        "id": "x6eDw3xd2hgzs84A53DnN",
        "code": "curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/drivingLicenceV2' \\\n--header 'Authorization:<token>' \\\n--header 'content-type: application/json' \\\n--data-raw '{\n    \"task\": \"fetch\",\n    \"essentials\": {\n        \"number\": \"<Licence Number>\",\n        \"dob\": \"<Date of Birth>\",\n        \"issueDate\": \"<Licence issue date>\"\n    }\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "YJZQWJW9uh_0hGh-MM1MF",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/patrons/drivingLicenceV2' \\\r\n--header 'Authorization:<token>' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"task\": \"fetch\",\r\n    \"essentials\": {\r\n        \"number\": \"<Licence Number>\",\r\n        \"dob\": \"<Date of Birth>\",\r\n        \"issueDate\": \"<Licence issue date>\"\r\n    }\r\n}'",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "YJZQWJW9uh_0hGh-MM1MF"
  },
  "description": "Fetching the details of a driving licence ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

### Response Parameter

| ***Parameter Name&#x20;***                                          | **Description**                                                                      |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| id                                                                  | Contains unique Id of the response                                                   |
| patronId                                                            | Patron ID taken from the login call                                                  |
| task                                                                | The task will be "fetch" in this case                                                |
| result                                                              | Contains the result of output                                                        |
| result.dlNumber                                                     | Dl Number of the lisense holder                                                      |
| result.dob                                                          | Date of birth of the driving licence holder                                          |
| result.badgeDetails                                                 | Badge details                                                                        |
| result.badgeDetails.badgeIssueDate                                  | Badge issue date                                                                     |
| result.badgeDetails.badgeNo                                         | Badge Number                                                                         |
| result.badgeDetails.classOfVehicle                                  | Type of vehicle                                                                      |
| result.dlValidiy                                                    | Validity of the vehicle                                                              |
| result.dlValidiy.nonTransport                                       | Validity dates of non transport vehicle                                              |
| result.dlValidiy.hazardousValidTill                                 | Validity date of pollution                                                           |
| result.dlValidiy.transport                                          | Valid transport region                                                               |
| result.detailsOfDrivingLicence                                      | Details of driving licence                                                           |
| result.detailsOfDrivingLicence.dateOfIssue                          | Issue date of the licence                                                            |
| result.detailsOfDrivingLicence.dateOfLastTransaction                | Date of last transaction                                                             |
| result.detailsOfDrivingLicence.status                               | Status of the Lisence                                                                |
| result.detailsOfDrivingLicence.lastTransectionAt                    | Last transaction at                                                                  |
| result.detailsOfDrivingLicence.name                                 | Name of the licence holder                                                           |
| result.detailsOfDrivingLicence.fatherOrHusbandName                  | Father or husband name of the licence holder                                         |
| result.detailsOfDrivingLicence.addressList                          | Address of the licence holder                                                        |
| result.detailsOfDrivingLicence.addressList.completeAdress           | Address details                                                                      |
| result.detailsOfDrivingLicence.addressList.type                     | Address type (Temperory/Permanent)                                                   |
| result.detailsOfDrivingLicence.addressList.splitAddress             | Split address                                                                        |
| result.detailsOfDrivingLicence.addressList.splitAddress.district    | Name of the District                                                                 |
| result.detailsOfDrivingLicence.addressList.splitAddress.state       | Name of the State                                                                    |
| result.detailsOfDrivingLicence.addressList.splitAddress.city        | Name of the City                                                                     |
| result.detailsOfDrivingLicence.addressList.splitAddress.pincode     | Pincode of the City                                                                  |
| result.detailsOfDrivingLicence.addressList.splitAddress.country     | Name of the country where the DL holder resides                                      |
| result.detailsOfDrivingLicence.addressList.splitAddress.addressLine | Individual address of the licence holder                                             |
| result.detailsOfDrivingLicence.addressList.completeAddress          | Complete address of the licence holder                                               |
| result.detailsOfDrivingLicence.addressList.type                     | Address type(temperory/permanent)                                                    |
| result.detailsOfDrivingLicence.addressList.splitAddress             | This object holds the address in split format                                        |
| result.detailsOfDrivingLicence.addressList.splitAddress.district    | District name                                                                        |
| result.detailsOfDrivingLicence.addressList.splitAddress.state       | State name                                                                           |
| result.detailsOfDrivingLicence.addressList.splitAddress.city        | City name                                                                            |
| result.detailsOfDrivingLicence.addressList.splitAddress.pincode     | Pincode of the city                                                                  |
| result.detailsOfDrivingLicence.addressList.splitAddress.country     | Name of the city                                                                     |
| result.detailsOfDrivingLicence.addressList.splitAddress.addressLine | AddressLIne                                                                          |
| result.detailsOfDrivingLicence.address                              | Address                                                                              |
| result.detailsOfDrivingLicence.photo                                | Photo of the DL                                                                      |
| result.detailsOfDrivingLicence.splitaddress                         | This object holds the address in split format                                        |
| result.detailsOfDrivingLicence.splitaddress.district                | Name of the district                                                                 |
| result.detailsOfDrivingLicence.splitaddress.state                   | Name of the state                                                                    |
| result.detailsOfDrivingLicence.splitaddress.city                    | Name of th city                                                                      |
| result.detailsOfDrivingLicence.splitaddress.pincode                 | Pincode of the city                                                                  |
| result.detailsOfDrivingLicence.splitaddress.country                 | Name of the country in which the Dl holder resides (useful for international travel) |
| result.detailsOfDrivingLicence.splitaddress.addressLine             | Address Line                                                                         |
| result.detailsOfDrivingLicence.covDetails                           | COV Details                                                                          |

***

:::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).
:::
