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)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()));ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
resp, err := client.Sessions.Signatures.DownloadDocument(ctx, "11111111-2222-3333-4444-555555555555", "feature_signature", "11111111-2222-3333-4444-555555555555")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
file, err := os.Create("download.pdf")
if err != nil {
log.Fatal(err)
}
defer file.Close()
if _, err := io.Copy(file, resp.Body); err != nil {
log.Fatal(err)
}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"));<?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');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)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");curl --request GET \
--url https://verification.didit.me/v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/ \
--header 'x-api-key: <api-key>'"<string>"Download Signed Document API: Signed PDF
Download the signed PDF of one document of an E-signature step, for a KYC or KYB session, with your API key.
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)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()));ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
resp, err := client.Sessions.Signatures.DownloadDocument(ctx, "11111111-2222-3333-4444-555555555555", "feature_signature", "11111111-2222-3333-4444-555555555555")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
file, err := os.Create("download.pdf")
if err != nil {
log.Fatal(err)
}
defer file.Close()
if _, err := io.Copy(file, resp.Body); err != nil {
log.Fatal(err)
}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"));<?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');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)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");curl --request GET \
--url https://verification.didit.me/v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/ \
--header 'x-api-key: <api-key>'"<string>"signatures[].documents[].signed_file.
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
signature_evidence_page is off). An Advanced (AES) PDF also carries the PAdES signature with its timestamp; a Simple PDF has no digital signature, seal or timestamp. Before returning it, Didit checks the stored file against sha256_signed and answers 409 with signature_document_changed if they differ.
A document that isn’t signed yet returns 404 with signature_not_signed. After you delete the session, the route returns 404.
Related
- E-signature report: what the signed PDF contains.
- Download the signature evidence
- Validate signatures
Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Path Parameters
Response
The signed PDF.
The response is of type file.