> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privue.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Driving licence verification

> Verify a driving licence and the date of birth claimed for it against the driving licence registry.



## OpenAPI

````yaml /suite/api-reference/openapi.json post /driving-licence/v1/verify.1
openapi: 3.1.0
info:
  title: Privue API Suite
  version: 1.0.0
  description: >-
    Business, tax, registry, employment and identity verification against
    official Indian sources, a person's own documents read through DigiLocker
    with their consent, and an EPF member's passbook read with the OTP they
    receive.


    **Authentication.** Every request takes your API key as a bearer token:
    `Authorization: Bearer <your-key>`.


    **One envelope.** Every check returns the reasons behind a refusal and the
    record the source held, and an empty `reasons` means the check passed.
    Branch on `reasons` rather than on the status code, because a call the
    source answered returns `200` whatever it concluded.


    **DigiLocker and EPFO passbook.** A DigiLocker endpoint returns `details`
    alone: what it read, as the source holds it. So do submitting an EPFO
    passbook OTP and reading the passbook; sending the OTP answers like a check.


    **Versioning.** Each endpoint is versioned on its own, directly in its path.
    A new version of one endpoint never moves another, so no release requires
    migrating every integration at once.
servers:
  - url: https://api.privue.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Checks
    description: One check on one subject, answered in the envelope every check shares.
  - name: DigiLocker
    description: >-
      A person's own documents, read through the consent they give at
      DigiLocker.
  - name: EPFO passbook
    description: >-
      A member's EPF passbook, read with the OTP sent to the mobile number on
      their account.
  - name: Orchestrated flows
    description: Every check on one business, asked and answered together in a single call.
  - name: Usage
    description: What you have called, and when.
paths:
  /driving-licence/v1/verify.1:
    post:
      tags:
        - Checks
      summary: Driving licence verification
      description: >-
        Verify a driving licence and the date of birth claimed for it against
        the driving licence registry.
      operationId: driving-licence.verify.1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DrivingLicenceVerifyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrivingLicenceVerifyResponse'
              examples:
                verified:
                  summary: A licence whose details match
                  value:
                    reasons: []
                    details:
                      number: MH1420110062821
                      details_match: true
                      issue_date: '2021-10-25'
                      expiry_date: '2041-10-22'
                      vehicle_classes:
                        - MCWG
                        - LMV
                mismatch:
                  summary: Details that do not match
                  value:
                    reasons:
                      - code: driving-licence-details-mismatch
                        message: >-
                          This date of birth, or the issue date sent with it, is
                          not the one the registry holds for this driving
                          licence.
                    details:
                      number: MH1420110062821
                      details_match: false
                      issue_date: null
                      expiry_date: null
                      vehicle_classes: []
                expired:
                  summary: A licence past its expiry
                  value:
                    reasons:
                      - code: driving-licence-expired
                        message: This driving licence has expired.
                    details:
                      number: MH1420110062821
                      details_match: true
                      issue_date: '2001-01-05'
                      expiry_date: '2021-01-04'
                      vehicle_classes:
                        - LMV
                not_registered:
                  summary: No licence under the number
                  value:
                    reasons:
                      - code: driving-licence-not-registered
                        message: No driving licence is registered under this number.
                    details: null
        '401':
          description: The API key is missing, malformed or not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '403':
          description: The key is valid but is not entitled to this feature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '422':
          description: >-
            The request failed validation, or the source would not accept the
            details in it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '429':
          description: >-
            The key is not cleared for this feature, or is sending too many
            requests. Nothing was called.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '503':
          description: >-
            The source could not be reached, or authentication is temporarily
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        default:
          description: The request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
components:
  schemas:
    DrivingLicenceVerifyRequest:
      properties:
        number:
          type: string
          pattern: ^[A-Z]{2}[A-Z0-9]{8,18}$
          title: Number
          description: >-
            Driving licence number in letters and digits alone, without spaces
            or hyphens, like MH1420110062821
        date_of_birth:
          type: string
          format: date
          title: Date Of Birth
          description: The holder's date of birth. It cannot be after today
        issue_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issue Date
          description: >-
            The date the licence was issued. Where given, it is verified as
            well. It cannot be after today, or before the date of birth
      type: object
      required:
        - number
        - date_of_birth
      title: DrivingLicenceVerifyRequest
      description: The driving licence to verify, and the holder details to hold it to.
    DrivingLicenceVerifyResponse:
      properties:
        reasons:
          items:
            $ref: '#/components/schemas/Reason'
          type: array
          title: Reasons
          description: >-
            Why the check did not pass, worst first, each a stable code with the
            text for it. Empty when it passed
        details:
          anyOf:
            - $ref: '#/components/schemas/DrivingLicenceVerification'
            - type: 'null'
          description: The registry's record of the licence
      type: object
      title: DrivingLicenceVerifyResponse
      description: >-
        What the registry holds for a driving licence, and whether the claimed
        details matched.


        `details` is null when the registry holds no licence under the number.


        A licence the registry holds whose details matched but that has passed
        its expiry date answers `driving-licence-expired`, with the licence
        alongside.
    SuiteError:
      properties:
        code:
          type: integer
          title: Code
          description: HTTP status code of the response
        timestamp:
          type: integer
          title: Timestamp
          description: Unix millisecond timestamp of when the response was produced
        message:
          type: string
          title: Message
          description: What went wrong, in one sentence
      type: object
      required:
        - code
        - timestamp
        - message
      title: SuiteError
      description: Why a request failed.
    Reason:
      properties:
        code:
          $ref: '#/components/schemas/ReasonCode'
          description: Stable code to branch on
        message:
          type: string
          title: Message
          description: What the code means, in one sentence
      type: object
      required:
        - code
        - message
      title: Reason
      description: One machine-readable reason a check did not pass.
    DrivingLicenceVerification:
      properties:
        number:
          type: string
          title: Number
          description: The licence number that was checked
        details_match:
          type: boolean
          title: Details Match
          description: >-
            Whether the date of birth, and the issue date where one was sent,
            are the ones the registry holds for this licence
        issue_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issue Date
          description: The date the licence was issued
        expiry_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expiry Date
          description: >-
            The last date the licence is valid on. Always present where the
            details matched
        vehicle_classes:
          items:
            type: string
          type: array
          title: Vehicle Classes
          description: >-
            The classes of vehicle the licence covers, as the registry codes
            them, such as `MCWG` or `LMV`
      type: object
      required:
        - number
        - details_match
      title: DrivingLicenceVerification
      description: >-
        A driving licence as the registry holds it, and whether the details
        claimed for it matched.


        The registry states the licence's dates and vehicle classes only where
        the details matched. Where they did not, both dates are null and
        `vehicle_classes` is empty.
    ReasonCode:
      type: string
      enum:
        - cin-not-registered
        - gstin-not-registered
        - gstin-inactive
        - pan-inactive
        - pan-name-mismatch
        - pan-date-of-birth-mismatch
        - udyam-not-registered
        - udyam-not-registered-for-pan
        - udyam-cancelled
        - gst-not-registered-for-pan
        - company-not-registered-for-pan
        - epfo-member-not-found
        - uan-not-registered-for-pan
        - driving-licence-not-registered
        - driving-licence-details-mismatch
        - driving-licence-expired
        - uan-not-registered-for-mobile
        - passport-not-registered
        - passport-name-mismatch
        - source-unavailable
        - details-refused
        - bank-account-unverified
        - bank-account-unsettled
      title: ReasonCode
      description: >-
        Why a check did not pass, as the stable code a client branches on.


        Declared rather than written as strings so that every code a check can
        answer with reaches the published schema, and a client reads the whole
        set from the API reference.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <your-key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.