> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Document

<Card title="Sample Responses" icon="file-code" href="/api-reference/kyc/entitylocker/sample-responses">
  See sample XML response returned by EntityLocker for GSTN Details and Udyam Certificate.
</Card>


## OpenAPI

````yaml api-reference/kyc/openapi.json GET /kyc/entitylocker-sdk/sessions/{session_id}/documents/{doc_type}
openapi: 3.1.0
info:
  title: in-co-sandbox-kyc
  description: ''
  version: 1.0.0
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security: []
tags:
  - name: kyc
  - name: digilocker-sdk
  - name: digilocker
  - name: aadhaar
  - name: bank
  - name: pan
  - name: mca
  - name: entitylocker
  - name: entitylocker-sdk
paths:
  /kyc/entitylocker-sdk/sessions/{session_id}/documents/{doc_type}:
    get:
      tags:
        - kyc
        - entitylocker-sdk
      summary: Get Document
      operationId: getDocument
      parameters:
        - name: session_id
          in: path
          description: >-
            Session identifier generated during EntityLocker SDK [Create Session
            API](https://developer.sandbox.co.in/api-reference/kyc/entitylocker-sdk/endpoints/create_session)
            .
          required: true
          example: 4b4bf7aa-f4da-47a8-9b32-895edfc03630
          schema:
            type: string
        - name: doc_type
          in: path
          description: >-
            Document type identifying which EntityLocker document to retrieve.
            Must match one of the consented doc_types values.
          required: true
          example: company_master_details
          schema:
            type: string
            enum:
              - company_master_details
              - gstn_details
              - udhyam_certificate
        - name: Authorization
          in: header
          description: >-
            JWT access token. For token-generation steps, refer to the
            [Quickstart
            Guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key used to identify and authenticate the client.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code
                  timestamp:
                    type: integer
                    description: >-
                      Unix timestamp (in milliseconds) indicating when the
                      server generated the response
                  data:
                    type: object
                    properties:
                      files:
                        type: array
                        description: >-
                          An array containing details of the requested files.
                          Each item in the array represents a single file.
                        items:
                          type: object
                          properties:
                            '@entity':
                              type: string
                            url:
                              type: string
                              description: >-
                                The URL from which the file can be downloaded.
                                This is a direct link to the file's location.
                            size:
                              type: integer
                              description: >-
                                The size of the file in bytes. This value
                                indicates the total data volume of the file.
                            metadata:
                              type: object
                              description: >-
                                An object containing additional descriptive
                                information about the file. This includes
                                details like content type, issuer, and
                                modification date.
                              properties:
                                ContentType:
                                  type: string
                                  description: >-
                                    The MIME type of the file. This specifies
                                    the format of the file, e.g.,
                                    "application/pdf".
                                issuer_id:
                                  type: string
                                  description: >-
                                    A unique identifier for the entity that
                                    issued or created the file. This ID helps in
                                    tracing the origin of the document.
                                issuer:
                                  type: string
                                  description: >-
                                    The name of the entity that issued or
                                    created the file. This provides a
                                    human-readable name for the file's source.
                                LastModified:
                                  type: string
                                  description: >-
                                    The date and time when the file was last
                                    modified. This timestamp is typically in ISO
                                    8601 format.
                                description:
                                  type: string
                                  description: >-
                                    A textual description of the file's content
                                    or purpose. This provides additional context
                                    about the file.
                              required:
                                - ContentType
                                - issuer_id
                                - issuer
                                - LastModified
                                - description
                    required:
                      - files
                  transaction_id:
                    type: string
                    description: Unique identifier for tracking the request across systems
                required:
                  - code
                  - timestamp
                  - data
                  - transaction_id
              examples:
                200 - Document Fetched:
                  summary: 200 - Document Fetched
                  value:
                    code: 200
                    timestamp: 1751975529441
                    data:
                      files:
                        - '@entity': org.quicko.drive.file
                          url: >-
                            https://in-co-sandbox-kyc-digilocker-dev.s3.ap-south-1.amazonaws.com/non-persistent/e385432b-575c-4b6f-8928-79136dbc0d4f/4b4bf7aa-f4da-47a8-9b32-895edfc03630/in.gov.uidai-ADHAR-0d5fe4d692c73e23c59a694eaaabc75a.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Date=20250708T115214Z&X-Amz-Expires=3600&X-Amz-Signature=8cc4b0e8eb3794601c7fdb7e85f3a6bb3a8e1842403c8aeae5c05b7af03bdadb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject
                          size: 16598
                          metadata:
                            ContentType: application/xml
                            issuer_id: in.gov.mca
                            issuer: >-
                              Ministry of Corporate Affairs (MCA), Govt. of
                              India
                            LastModified: 09/05/2025
                            description: Company Master Details
                    transaction_id: a4d43b74-0f9c-480c-9300-f011100b674b
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                  message:
                    type: string
                  transaction_id:
                    type: string
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                400 - Consent not provided:
                  summary: 400 - Consent not provided
                  value:
                    code: 400
                    timestamp: 1760432035872
                    message: Consent for gstn_details not provided
                    transaction_id: 3d1d2d37-3179-4a3c-8397-2287084d1de1
          headers: {}
        '503':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              examples:
                503 - Source unavailable:
                  summary: 503 - Source unavailable
                  value:
                    code: 503
                    timestamp: 1000000000000
                    transaction_id: 6c05f692-c32f-4de0-92b4-56684bdf16f0
                    message: Source Unavailable
          headers: {}
        '521':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                  message:
                    type: string
                  transaction_id:
                    type: string
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                521 - Data Not Found:
                  summary: 521 - Data Not Found
                  value:
                    code: 521
                    timestamp: 1760428752393
                    message: 'Data not found for: 839fd8a0-d645-42e1-a904-bb43353b0139'
                    transaction_id: 8be099b1-8d19-457e-b907-5b825740d9cc
          headers: {}
        '523':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                  message:
                    type: string
                  transaction_id:
                    type: string
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                523 - Invalid Session Lifecycle:
                  summary: 523 - Invalid Session Lifecycle
                  value:
                    code: 523
                    timestamp: 1760431743347
                    message: Cannot get document due to invalid session lifecycle
                    transaction_id: 031c9d24-99c4-49cb-b4ba-11e8c3630f9f
          headers: {}
      deprecated: false
      security: []

````