from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
signature_id="0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
{
signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
},
);
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.Signatures.Validate(ctx, "11111111-2222-3333-4444-555555555555", "feature_signature", didit.SessionsSignaturesValidateParams{
SignatureID: didit.String("0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.SessionsSignaturesValidateParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().signatures().validate("11111111-2222-3333-4444-555555555555", "feature_signature", SessionsSignaturesValidateParams.builder()
.signatureId("0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->signatures->validate('11111111-2222-3333-4444-555555555555', 'feature_signature', [
'signature_id' => '0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.Signatures.ValidateAsync("11111111-2222-3333-4444-555555555555", "feature_signature", new SessionsSignaturesValidateParams
{
SignatureId = "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/signatures/{nodeId}/validate/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"signature_id": "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
}
'{
"signatures": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"status": "intro",
"verdict": "Not Finished",
"level": "simple",
"format": "pdf",
"profile": "<string>",
"signer": {
"name": "<string>",
"capacity": "self",
"company": "<string>",
"role": "<string>",
"roles": [
"<string>"
],
"identity_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"identity_used": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kyc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verified": true,
"expected_name": "<string>"
},
"certificate": {
"issuer": "<string>",
"issued_to": "<string>",
"serial": "<string>",
"valid_from": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z"
},
"confirmation": {
"sent_by": "didit",
"channel": "email",
"destination": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"attempts": 123
},
"timestamp": {
"time": "2023-11-07T05:31:56Z",
"qualified": true,
"valid": true
},
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"language": "en",
"source_revision": "22222222-2222-4222-8222-222222222222",
"translation_id": null,
"file_name": "<string>",
"pages": 123,
"size_bytes": 123,
"sha256_original": "<string>",
"sha256_signed": "<string>",
"status": "signed",
"opened_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"read_to_end": true,
"consented_at": "2023-11-07T05:31:56Z",
"consent": true,
"signed_file": "<string>",
"mode": "fields",
"source_format": "pdf",
"conversion": {
"from": "docx",
"file_name": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"converter": "<string>"
},
"fields": [
{
"key": "<string>",
"type": "signature",
"role": "verified_person",
"label": "<string>",
"page": 123,
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"required": true,
"value": "<unknown>",
"display_value": "<string>",
"value_source": "signer",
"filled_at": "2023-11-07T05:31:56Z",
"image_url": "<string>",
"value_unavailable_reason": "source_empty"
}
]
}
],
"adopted_signature": {
"method": "typed",
"font": "<string>",
"adopted_at": "2023-11-07T05:31:56Z"
},
"electronic_signature_consent_at": "2023-11-07T05:31:56Z",
"evidence_file": "<string>",
"warnings": [
{
"code": "SIGNATURE_DECLINED",
"node_id": "<string>"
}
],
"validation": {
"valid": true,
"reason": "<string>",
"checked_at": "2023-11-07T05:31:56Z",
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checked_at": "2023-11-07T05:31:56Z",
"valid": true,
"integrity": true,
"trusted": true,
"revoked": true,
"trusted_list": {
"status": "<string>",
"reason": "<string>"
},
"certificate": {
"issuer": "<string>",
"issued_to": "<string>",
"serial": "<string>",
"valid_from": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z",
"qualified_statements": {
"qc_compliance": true,
"qc_sscd": true,
"qc_type_esign": true
}
},
"timestamp": {
"time": "2023-11-07T05:31:56Z",
"qualified": true,
"valid": true
},
"qualified": true,
"profile": "<string>",
"failed_checks": [
"integrity"
]
}
],
"profile": "<string>"
},
"declined_at": "2023-11-07T05:31:56Z",
"declined_action": "DECLINE",
"signed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"email_sent_at": "2023-11-07T05:31:56Z",
"email_unavailable_reason": "<string>",
"ip_address": "<string>",
"place": "<string>",
"place_unavailable_reason": "not_collected"
}
]
}Validate Signatures API: Re-check Signed PDFs
Re-check the signed documents of an E-signature step: file integrity, the PAdES signature, the certificate, revocation data and timestamp.
from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
signature_id="0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
{
signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
},
);
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.Signatures.Validate(ctx, "11111111-2222-3333-4444-555555555555", "feature_signature", didit.SessionsSignaturesValidateParams{
SignatureID: didit.String("0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.SessionsSignaturesValidateParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().signatures().validate("11111111-2222-3333-4444-555555555555", "feature_signature", SessionsSignaturesValidateParams.builder()
.signatureId("0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->signatures->validate('11111111-2222-3333-4444-555555555555', 'feature_signature', [
'signature_id' => '0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.signatures.validate(
"11111111-2222-3333-4444-555555555555",
"feature_signature",
signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.Signatures.ValidateAsync("11111111-2222-3333-4444-555555555555", "feature_signature", new SessionsSignaturesValidateParams
{
SignatureId = "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/signatures/{nodeId}/validate/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"signature_id": "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
}
'{
"signatures": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"status": "intro",
"verdict": "Not Finished",
"level": "simple",
"format": "pdf",
"profile": "<string>",
"signer": {
"name": "<string>",
"capacity": "self",
"company": "<string>",
"role": "<string>",
"roles": [
"<string>"
],
"identity_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"identity_used": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kyc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verified": true,
"expected_name": "<string>"
},
"certificate": {
"issuer": "<string>",
"issued_to": "<string>",
"serial": "<string>",
"valid_from": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z"
},
"confirmation": {
"sent_by": "didit",
"channel": "email",
"destination": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"attempts": 123
},
"timestamp": {
"time": "2023-11-07T05:31:56Z",
"qualified": true,
"valid": true
},
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"language": "en",
"source_revision": "22222222-2222-4222-8222-222222222222",
"translation_id": null,
"file_name": "<string>",
"pages": 123,
"size_bytes": 123,
"sha256_original": "<string>",
"sha256_signed": "<string>",
"status": "signed",
"opened_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"read_to_end": true,
"consented_at": "2023-11-07T05:31:56Z",
"consent": true,
"signed_file": "<string>",
"mode": "fields",
"source_format": "pdf",
"conversion": {
"from": "docx",
"file_name": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"converter": "<string>"
},
"fields": [
{
"key": "<string>",
"type": "signature",
"role": "verified_person",
"label": "<string>",
"page": 123,
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"required": true,
"value": "<unknown>",
"display_value": "<string>",
"value_source": "signer",
"filled_at": "2023-11-07T05:31:56Z",
"image_url": "<string>",
"value_unavailable_reason": "source_empty"
}
]
}
],
"adopted_signature": {
"method": "typed",
"font": "<string>",
"adopted_at": "2023-11-07T05:31:56Z"
},
"electronic_signature_consent_at": "2023-11-07T05:31:56Z",
"evidence_file": "<string>",
"warnings": [
{
"code": "SIGNATURE_DECLINED",
"node_id": "<string>"
}
],
"validation": {
"valid": true,
"reason": "<string>",
"checked_at": "2023-11-07T05:31:56Z",
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checked_at": "2023-11-07T05:31:56Z",
"valid": true,
"integrity": true,
"trusted": true,
"revoked": true,
"trusted_list": {
"status": "<string>",
"reason": "<string>"
},
"certificate": {
"issuer": "<string>",
"issued_to": "<string>",
"serial": "<string>",
"valid_from": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z",
"qualified_statements": {
"qc_compliance": true,
"qc_sscd": true,
"qc_type_esign": true
}
},
"timestamp": {
"time": "2023-11-07T05:31:56Z",
"qualified": true,
"valid": true
},
"qualified": true,
"profile": "<string>",
"failed_checks": [
"integrity"
]
}
],
"profile": "<string>"
},
"declined_at": "2023-11-07T05:31:56Z",
"declined_action": "DECLINE",
"signed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"email_sent_at": "2023-11-07T05:31:56Z",
"email_unavailable_reason": "<string>",
"ip_address": "<string>",
"place": "<string>",
"place_unavailable_reason": "not_collected"
}
]
}validation. Didit re-reads every signed PDF and checks its SHA-256. For an Advanced (AES) signature it also validates the PAdES signature, the certificate, the revocation data and the timestamp. A Simple signature has no digital signature, so only the integrity of the file is checked. Nothing is signed again. In the console, this is the Validate again button of the session’s Signature tab.
curl -X POST 'https://verification.didit.me/v3/session/{session_id}/signatures/{node_id}/validate/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"signature_id": "{signature_id}"}'
signature_id to check one signer. Without it, Didit checks every signer of the step, and answers 409 with signature_not_signed if any of them hasn’t signed. A stored signed PDF that no longer matches its sha256_signed returns 400 with signature_document_changed.
The response is { "signatures": [...] } with the checked signers. Read validation.valid for the overall result and validation.documents[] for each document. See Validate a signature again for every field.
Related
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.
Headers
Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.
1 - 255