> ## 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.

# DigiLocker files

> Read issued documents by their file ids, each with its file as PDF and XML.



## OpenAPI

````yaml /suite/api-reference/openapi.json post /digilocker/v1/files.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:
  /digilocker/v1/files.1:
    post:
      tags:
        - DigiLocker
      summary: DigiLocker files
      description: >-
        Read issued documents by their file ids, each with its file as PDF and
        XML.
      operationId: digilocker.files.1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilesRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigilockerFilesResponse'
              examples:
                files:
                  summary: A driving licence, with its files
                  value:
                    details:
                      files:
                        - name: Driving License
                          type: file
                          size: ''
                          date: 04/10/2026
                          parent: ''
                          mime:
                            - application/pdf
                            - application/xml
                          doc_type: DRVLC
                          description: Driving License
                          issuer_id: in.gov.transport
                          issuer: Ministry of Road Transport and Highways
                          id: in.gov.transport-DRVLC-TN8920000007545
                          file:
                            pdf: >-
                              https://files.example.com/digilocker/2b8e4d06a1.pdf
                            xml: >-
                              https://files.example.com/digilocker/2b8e4d06a2.xml
        '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'
        '404':
          description: >-
            No consent link you created in the last 30 days carries this
            `request_id`.
          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:
    FilesRequest:
      properties:
        request_id:
          type: string
          minLength: 1
          title: Request Id
          description: The `request_id` the consent link was created with
          examples:
            - 652523835a9f9000112b1ee6
        file_ids:
          items:
            type: string
            minLength: 1
          type: array
          minItems: 1
          title: File Ids
          description: >-
            The `id` of each issued document to read, as
            `/digilocker/v1/details.1` lists them
          examples:
            - - in.gov.transport-DRVLC-TN8920000007545
      additionalProperties: false
      type: object
      required:
        - request_id
        - file_ids
      title: FilesRequest
      description: The consent to read through, and the issued documents to read.
    DigilockerFilesResponse:
      properties:
        details:
          $ref: '#/components/schemas/DigilockerFiles'
          description: The documents and their files
      type: object
      required:
        - details
      title: DigilockerFilesResponse
      description: The issued documents asked for, each with its file.
    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.
    DigilockerFiles:
      properties:
        files:
          anyOf:
            - items:
                $ref: '#/components/schemas/FetchedFile'
              type: array
            - type: 'null'
          title: Files
      type: object
      title: DigilockerFiles
      description: The issued documents that were asked for, each with its file.
    FetchedFile:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: When the file was read, as DD/MM/YYYY
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        mime:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Mime
          description: The formats the document is available in
        doc_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        issuer_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Id
        issuer:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            The document's file id: its issuer, its type and its number, which
            `/digilocker/v1/files.1` reads
        file:
          anyOf:
            - $ref: '#/components/schemas/FileContent'
            - type: 'null'
      type: object
      title: FetchedFile
      description: One issued document, with its file.
    FileContent:
      properties:
        pdf:
          anyOf:
            - type: string
            - type: 'null'
          title: Pdf
        xml:
          anyOf:
            - type: string
            - type: 'null'
          title: Xml
      type: object
      title: FileContent
      description: An issued document's file, as a download link or as base64.
  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.