> ## 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 document pull

> Pull a document from its issuer into the person's DigiLocker account, and return it.

`/digilocker/v1/document-types.1` lists every document that can be pulled, the `org_id` of its issuer, and the `search_parameters` it is pulled by.



## OpenAPI

````yaml /suite/api-reference/openapi.json post /digilocker/v1/pull-document.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/pull-document.1:
    post:
      tags:
        - DigiLocker
      summary: DigiLocker document pull
      description: >-
        Pull a document from its issuer into the person's DigiLocker account,
        and return it.


        `/digilocker/v1/document-types.1` lists every document that can be
        pulled, the `org_id` of its issuer, and the `search_parameters` it is
        pulled by.
      operationId: digilocker.pull-document.1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PullDocumentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PulledDocumentResponse'
              examples:
                pulled:
                  summary: A PAN pulled from its issuer
                  value:
                    details:
                      pdf: https://files.example.com/digilocker/5d2a7c19f1.pdf
                      xml: https://files.example.com/digilocker/5d2a7c19f2.xml
                      file_id: in.gov.pan-PANCR-ABCDE1234F
        '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:
    PullDocumentRequest:
      properties:
        request_id:
          type: string
          minLength: 1
          title: Request Id
          description: The `request_id` the consent link was created with
          examples:
            - 652523835a9f9000112b1ee6
        doc_type:
          type: string
          minLength: 1
          title: Doc Type
          description: The document type, as `/digilocker/v1/document-types.1` lists it
          examples:
            - PANCR
        org_id:
          type: string
          minLength: 1
          title: Org Id
          description: >-
            The issuer's organisation id, as `/digilocker/v1/document-types.1`
            lists it
          examples:
            - '001891'
        consent:
          type: string
          enum:
            - 'Y'
            - 'N'
          title: Consent
          description: Whether the person consents to the document being pulled
        search_parameters:
          additionalProperties:
            type: string
          type: object
          title: Search Parameters
          description: >-
            The search parameters the document type requires, each named exactly
            as Document types lists it in `parameter_name`.
          examples:
            - panName: Name
              panno: ABCDE1234F
        get_base64_files:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Get Base64 Files
          description: Whether files come back as base64 in place of a download link
        get_e_aadhaar_pdf:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Get E Aadhaar Pdf
          description: Whether the e-Aadhaar PDF comes back
      additionalProperties: false
      type: object
      required:
        - request_id
        - doc_type
        - org_id
        - consent
        - search_parameters
      title: PullDocumentRequest
      description: >-
        The document to pull from its issuer, found by the search parameters its
        type requires.
    PulledDocumentResponse:
      properties:
        details:
          $ref: '#/components/schemas/PulledDocument'
          description: The document, and its file id
      type: object
      required:
        - details
      title: PulledDocumentResponse
      description: A document pulled from its issuer into the person's DigiLocker account.
    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.
    PulledDocument:
      properties:
        pdf:
          anyOf:
            - type: string
            - type: 'null'
          title: Pdf
        xml:
          anyOf:
            - type: string
            - type: 'null'
          title: Xml
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
      type: object
      title: PulledDocument
      description: A document pulled from its issuer, 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.