Skip to content

Signature Chains

Retrieve the full signature chain for a document, showing its signing history from original to latest version.

Get Signature Chain

Endpoint: GET /api/sdk/v1/documents/:id/signature-chain

ParameterTypeRequiredDescription
documentIdstringYesThe document identifier

Response (SignatureChain)

FieldTypeDescription
originalDocumentIdstringID of the original (first) document
chainLengthnumberTotal documents in the chain
documentsSignatureChainDocument[]Ordered array of chain documents

Chain Document Fields (SignatureChainDocument)

FieldTypeDescription
idstringDocument ID
namestringDocument name
isSignedbooleanWhether this version is signed
signatureTypeSignatureType?Type of signature applied ('SIMPLE', 'ADVANCE', 'AES')
signatureobject?Signature details (signedAt, certificateId, isPadesCompliant)
signatureChainOrdernumberPosition in the chain (0-based)
isLatestVersionbooleanWhether this is the most recent version
parentDocumentIdstring | nullID of the parent document in chain
originalDocumentIdstring | nullID of the original document
createdAtstringISO 8601 creation timestamp

Signature Types

TypeDescription
'SIMPLE'Simple electronic signature
'ADVANCE'Advanced electronic signature
'AES'Advanced Electronic Signature (qualified)

Example

const chain = await sdk.documents.getSignatureChain('doc_abc123');
console.log(`Chain has ${chain.chainLength} versions`);
console.log(`Original document: ${chain.originalDocumentId}`);
for (const doc of chain.documents) {
const status = doc.isSigned ? `Signed (${doc.signatureType})` : 'Unsigned';
const latest = doc.isLatestVersion ? ' [LATEST]' : '';
console.log(` #${doc.signatureChainOrder}: ${doc.name}${status}${latest}`);
}