This method retrieves one or more PDF documents from the template that you specify.

You can specify the ID of the document to retrieve, or pass in the value combined to retrieve all documents in the template as a single PDF file.

Request

HTTP request

GET /v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

documentIdstring

The documentId is set by the API client. It is an integer that falls between 1 and 2,147,483,647. The value is encoded as a string without commas. The values 1, 2, 3, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a documentId property that specifies the document on which to place the tab.

templateIdstring

The id of the template.

Optional Query Parameters
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.

show_changesstring

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

Responses

CodeDescriptionReference
200

Successful response.

400

Error encountered.

errorDetails

SDK Method

Templates::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.

}} />