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

# हस्ताक्षरित दस्तावेज़ डाउनलोड API: हस्ताक्षरित PDF

> Didit के साथ अपनी API कुंजी से KYC या KYB सत्र के ई-हस्ताक्षर चरण के एक दस्तावेज़ का हस्ताक्षरित PDF डाउनलोड करें।

लौटाता है एक दस्तावेज़ का हस्ताक्षरित PDF, जब उसका हस्ताक्षरकर्ता हस्ताक्षर कर चुका हो। आपको URL बनाने की ज़रूरत नहीं है: निर्णय में हर हस्ताक्षरित दस्तावेज़ का पथ `signatures[].documents[].signed_file` में होता है।

```bash theme={null}
curl -L 'https://verification.didit.me/v3/session/{session_id}/signatures/{node_id}/documents/{document_id}/file/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -o agreement-signed.pdf
```

PDF में वह दस्तावेज़ होता है जो हस्ताक्षरकर्ता को दिखाया गया था, जिस पर उसके फ़ील्ड मान अंकित होते हैं, और साक्ष्य पृष्ठ भी (जब तक चरण का `signature_evidence_page` बंद न हो)। एक Advanced (AES) PDF में PAdES हस्ताक्षर उसके टाइमस्टैम्प के साथ भी होता है; एक Simple PDF में कोई डिजिटल हस्ताक्षर, सील या टाइमस्टैम्प नहीं होता। लौटाने से पहले, Didit संग्रहीत फ़ाइल की जाँच `sha256_signed` से करता है, और यदि वे भिन्न हों तो `signature_document_changed` के साथ `409` लौटाता है।

जो दस्तावेज़ अभी हस्ताक्षरित नहीं है, उसके लिए `signature_not_signed` के साथ `404` लौटता है। [सत्र हटाने](https://docs.didit.me/hi/sessions-api/delete-session.md) के बाद, यह रूट `404` लौटाता है।

## संबंधित

* [ई-हस्ताक्षर रिपोर्ट](https://docs.didit.me/hi/core-technology/electronic-signature/report-electronic-signature.md#हस्ताक्षरित-pdf): हस्ताक्षरित PDF में क्या होता है।
* [हस्ताक्षर साक्ष्य डाउनलोड करें](https://docs.didit.me/hi/sessions-api/electronic-signature/download-evidence.md)
* [हस्ताक्षर सत्यापित करें](https://docs.didit.me/hi/sessions-api/electronic-signature/validate-signatures.md)


## OpenAPI

````yaml hi/openapi-25.json GET /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: पहचान सत्यापन API। x-api-key हेडर के साथ प्रमाणीकृत करें।
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/:
    get:
      tags:
        - Sessions
      summary: हस्ताक्षरित दस्तावेज़ डाउनलोड करें
      description: >-
        ई-हस्ताक्षर चरण के किसी एक दस्तावेज़ का हस्ताक्षरित PDF डाउनलोड करें।
        निर्णय में `signatures[].documents[]` के `signed_file` पथ का उपयोग करें।
        PDF में वह दस्तावेज़ होता है जो हस्ताक्षरकर्ता को दिखाया गया था, जिस पर
        उनके फ़ील्ड मान अंकित किए गए थे और साक्ष्य पृष्ठ (जब तक कि
        `signature_evidence_page` बंद न हो)। Advanced (AES) PDF में इसके
        टाइमस्टैम्प के साथ PAdES हस्ताक्षर भी होता है; Simple PDF में कोई डिजिटल
        हस्ताक्षर, सील या टाइमस्टैम्प नहीं होता है। Didit फ़ाइल को वापस करने से
        पहले `sha256_signed` के विरुद्ध इसकी जाँच करता है।


        उपयोगकर्ता सत्यापन (KYC) और व्यवसाय सत्यापन (KYB) सत्रों के लिए काम करता
        है। `read:sessions` आवश्यक है; आपकी API कुंजी काम करती है। [ई-हस्ताक्षर
        रिपोर्ट](/hi/core-technology/electronic-signature/report-electronic-signature#हस्ताक्षरित-दस्तावेज़-डाउनलोड-करें)
        देखें।
      operationId: get_v3_session_signature_document_file
      parameters:
        - name: sessionId
          in: path
          required: true
          description: उपयोगकर्ता सत्यापन (KYC) या व्यवसाय सत्यापन (KYB) सत्र।
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
        - name: nodeId
          in: path
          required: true
          description: 'ई-हस्ताक्षर चरण: `signatures[]` में आइटम का `node_id`।'
          schema:
            type: string
            example: feature_signature
        - name: documentId
          in: path
          required: true
          description: '`signatures[].documents[]` में दस्तावेज़ का `id`।'
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: हस्ताक्षरित PDF।
          headers:
            Content-Disposition:
              description: फ़ाइल नाम के साथ अटैचमेंट।
              schema:
                type: string
                example: attachment; filename="agreement-signed.pdf"
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '403':
          description: >-
            क्रेडेंशियल मौजूद नहीं हैं, या ऐसा क्रेडेंशियल है जो इस सत्र को पढ़
            नहीं सकता। अनुपलब्ध कुंजी `403` लौटाती है; गलत, निरस्त या समय-सीमा
            समाप्त कुंजी `401` लौटाती है।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: You do not have permission to perform this action.
        '404':
          description: >-
            कोई हस्ताक्षरित दस्तावेज़ मेल नहीं खाता: सत्र, चरण या दस्तावेज़
            मौजूद नहीं है, हटा दिया गया था, या अभी तक हस्ताक्षरित नहीं है।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Not signed yet:
                  summary: हस्ताक्षरकर्ता ने हस्ताक्षर नहीं किए हैं
                  value:
                    code: signature_not_signed
                    detail: signature_not_signed
                Unknown document:
                  summary: इस चरण में ऐसा कोई दस्तावेज़ नहीं है
                  value:
                    code: signature_not_found
                    detail: signature_not_found
        '409':
          description: >-
            संग्रहीत फ़ाइल अब इसके रिकॉर्ड किए गए SHA-256 से मेल नहीं खाती। कुछ
            भी वापस नहीं किया गया है।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Changed file:
                  summary: स्टोर की गई फ़ाइल अपने हैश से मेल नहीं खाती
                  value:
                    code: signature_document_changed
                    detail: signature_document_changed
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            content = client.sessions.signatures.download_document(
                "11111111-2222-3333-4444-555555555555",
                "feature_signature",
                "11111111-2222-3333-4444-555555555555",
            )
            with open("download.pdf", "wb") as file:
                file.write(content)
        - lang: javascript
          label: Node.js
          source: >-
            import { writeFile } from "node:fs/promises";

            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const content = await didit.sessions.signatures.downloadDocument(
              "11111111-2222-3333-4444-555555555555",
              "feature_signature",
              "11111111-2222-3333-4444-555555555555",
            );

            await writeFile("download.pdf", Buffer.from(await
            content.arrayBuffer()));
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadDocument(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            client.sessions().signatures().downloadDocument("11111111-2222-3333-4444-555555555555",
            "feature_signature", "11111111-2222-3333-4444-555555555555")
                    .writeTo(Path.of("download.pdf"));
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $content =
            $didit->sessions->signatures->downloadDocument('11111111-2222-3333-4444-555555555555',
            'feature_signature', '11111111-2222-3333-4444-555555555555');

            $content->saveTo('download.pdf');
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            content = didit.sessions.signatures.download_document(
              "11111111-2222-3333-4444-555555555555",
              "feature_signature",
              "11111111-2222-3333-4444-555555555555"
            )
            File.binwrite("download.pdf", content)
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var content = await
            client.Sessions.Signatures.DownloadDocumentAsync("11111111-2222-3333-4444-555555555555",
            "feature_signature", "11111111-2222-3333-4444-555555555555");

            await content.SaveToAsync("download.pdf");
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

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