Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted.

Request

HTTP request

GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

documentIdstring

This parameter takes the following special keywords:

  • combined: Retrieves a PDF file that contains the combined content of all of the documents. If the account option Attach certification of completion to envelope is on, then the Certificate of Completion is also included in the PDF file. You set this account option in the Admin tool on the Signing Settings screen, or by setting the attachCompletedEnvelope property in the accountSettings object to true.
  • archive: Retrieves a ZIP archive that contains all of the PDF documents and the Certificate of Completion.

envelopeIdstring

The envelope's GUID.

Example: 93be49ab-afa0-4adf-933c-f752070d71ec

Optional Query Parameters
certificatestring

When set to false, the envelope signing certificate is removed from the download.

documents_by_useridstring

When set to true, allows recipients to get documents by their user id. For example, if a user is included in two different routing orders with different visibilities, using this parameter returns all of the documents from both routing orders.

encodingstring

Reserved for DocuSign.

encryptstring

When set to true, the PDF bytes returned in the response are encrypted for all the key managers configured on your DocuSign account. You can decrypt the documents by using the Key Manager DecryptDocument API method. For more information about Key Manager, see the DocuSign Security Appliance Installation Guide that your organization received from DocuSign.

languagestring

Specifies the language for the Certificate of Completion in the response. The supported languages are: Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Dutch (nl), English US (en), French (fr), German (de), Italian (it), Japanese (ja), Korean (ko), Portuguese (pt), Portuguese (Brazil) (pt_BR), Russian (ru), Spanish (es).

recipient_idstring

Allows the sender to retrieve the documents as one of the recipients that they control. The documents_by_userid parameter must be set to false for this functionality to work.

shared_user_idstring

The ID of a shared user that you want to impersonate in order to retrieve their view of the list of documents. This parameter is used in the context of a shared inbox (i.e., when you share envelopes from one user to another through the RADmin console).

show_changesstring

When set to true, any changed fields for the returned PDF are highlighted in yellow and optional signatures or initials outlined in red.

watermarkstring

When set to true, the account has the watermark feature enabled, and the envelope is not complete, then the watermark for the account is added to the PDF documents. This option can remove the watermark.

Responses

CodeDescriptionReference
200

Successful response.

400

Error encountered.

errorDetails

SDK Method

Envelopes::getDocument

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

Examples

Get a Single Document as a PDF File

This example shows how to retrieve a single document from an envelope as a PDF file.

The request for this endpoint has no payload.

Request

GET /restapi/v2.1/accounts/1703061/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/3

Response
"PDF File"
Get All Documents as a Single PDF File

If you use combined instead of a document id the response is a PDF file that contains all of the documents in the specified envelope.

The request for this endpoint has no payload.

Request

GET /restapi/v2.1/accounts/1703061/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/combined

Response
"PDF File"
List All Documents in an Envelope

This example shows how to get a list of all the documents in an envelope.

The request for this endpoint has no payload.

Request

GET /restapi/v2.1/accounts/1703061/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents

Response
{
  "envelopeDocuments": [
    {
      "availableDocumentTypes": [
        {
          "isDefault": "true",
          "type": "electronic"
        }
      ],
      "display": "inline",
      "documentId": "1",
      "includeInDownload": "true",
      "name": "NDA.pdf",
      "order": "1",
      "pages": "3",
      "signerMustAcknowledge": "no_interaction",
      "type": "content",
      "uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/1"
    },
    {
      "availableDocumentTypes": [
        {
          "isDefault": "true",
          "type": "electronic"
        }
      ],
      "display": "inline",
      "documentId": "2",
      "includeInDownload": "true",
      "name": "House.pdf",
      "order": "2",
      "pages": "1",
      "signerMustAcknowledge": "no_interaction",
      "type": "content",
      "uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/2"
    },
    {
      "availableDocumentTypes": [
        {
          "isDefault": "true",
          "type": "electronic"
        }
      ],
      "display": "inline",
      "documentId": "3",
      "includeInDownload": "true",
      "name": "contractor_agreement.docx",
      "order": "3",
      "pages": "2",
      "signerMustAcknowledge": "no_interaction",
      "type": "content",
      "uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/3"
    },
    {
      "availableDocumentTypes": [
        {
          "isDefault": "true",
          "type": "electronic"
        }
      ],
      "display": "inline",
      "documentId": "certificate",
      "includeInDownload": "true",
      "name": "Summary",
      "order": "999",
      "pages": "4",
      "signerMustAcknowledge": "no_interaction",
      "type": "summary",
      "uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/certificate"
    }
  ],
  "envelopeId": "44efc9e6-915e-4b1d-9b54-801410d6922d"
}
}} />