Get Document
Retrieves a specific document from an envelope. Returns the document content as base64-encoded data.
Overview
- Purpose: Download signed or unsigned documents from envelopes.
- Use Cases: Archiving completed documents, retrieving signed contracts, downloading certificates of completion.
- API Method: GET /envelopes/:envelopeId/documents/:documentId
Required Input Fields
Envelope ID: The unique identifier of the envelope containing the document.
Document ID: The unique identifier of the document within the envelope (e.g., ‘1’, ‘2’, ‘3’, or ‘certificate’ for completion certificate).
Document ID Values
- Numeric IDs: ‘1’, ‘2’, ‘3’, etc. for the actual documents in the envelope.
- ‘certificate’: Special ID to retrieve the certificate of completion (available after envelope is completed).
- ‘combined’: Special ID to retrieve all documents combined into a single PDF.
- ‘archive’: Special ID to retrieve a ZIP file containing all documents and the certificate.
Output
- Document Content: Base64-encoded string containing the document data.
- Format: The document is returned in its original format (PDF, DOCX, etc.).
- Decoding: Decode the base64 string to get the actual file content.
Document Availability
- Draft Envelopes: Documents available in their original unsigned form.
- Sent Envelopes: Documents available but may not have all signatures yet.
- Completed Envelopes: Documents include all signatures and are finalized.
- Certificate: Only available after envelope status is ‘completed’.
Tips
[!TIP] Use documentId ‘certificate’ to get the certificate of completion
[!TIP] Use documentId ‘combined’ to download all documents as one PDF
[!TIP] Decode base64 content before saving to file system
[!TIP] Store completed documents in your document management system
[!TIP] Retrieve documents after envelope completion for archival
[!TIP] Use ‘Get Envelope’ first to verify envelope is completed before downloading
Need help? Have feedback?