Retrieves a list of documents associated with the specified envelope.

Request

HTTP request

GET /v2/accounts/{accountId}/envelopes/{envelopeId}/documents

Parameters

Parameter name Value Description
Path parameters
accountId string

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

envelopeId string

The envelope's GUID. Eg 93be49ab-afa0-4adf-933c-f752070d71ec

Responses

Code Description Reference
200 OK Successful response.
400 Bad Request Error encountered.

SDK Method

Envelopes::listDocuments

Definitions Expand All | Collapse All

EnvelopeDocuments

Envelope documents

envelopeDocuments
[envelopeDocument]
envelopeId string

The envelope ID of the envelope status that failed to post.

envelopeDocument

attachmentTabId string
authoritativeCopy string

Specifies whether all documents in this envelope are authoritative copies. A document can set its own authoritativeCopy property to override this value.

availableDocumentTypes
[signatureType]
containsPdfFormFields string
display string

This string sets the display and behavior properties of the document during signing. The possible values are:

  • modal
    The document is shown as a supplement action strip and can be viewed, downloaded, or printed in a modal window. This is the recommended value for supplemental documents.

  • download
    The document is shown as a supplement action strip and can be viewed, downloaded, or printed in a new browser window.

  • inline
    The document is shown in the normal signing window. This value is not used with supplemental documents, but is the default value for all other documents.

documentFields
[nameValue]
documentGroup string
documentId string

Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.

errorDetails errorDetails
includeInDownload string

When set to true, the document is included in the combined document download. The default value is true.

name string
order string

An optional value that sets the direction order used to sort the item list.

Valid values are:

  • asc = ascending sort order
  • desc = descending sort order
pages string
signerMustAcknowledge string

Sets how the signer interacts with the supplemental document. The possible values are:

  • no_interaction
    No recipient action is required.

  • view
    The recipient is required to view the document.

  • accept
    The recipient is required to accept the document by selecting accept during signing, but is not required to view the document.

  • view_accept
    The recipient is required to view and accept the document.

type string

Type of the user. Valid values: type_owner, type_participant.

uri string

errorDetails

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

errorCode string

An error code associated with the error.

message string

A short error message.

nameValue

errorDetails errorDetails
name string

The name or key of a name/value pair.

originalValue string

The initial value of the tab when it was sent to the recipient.

value string

The value field of a name/value pair.

signatureType

isDefault string
type string

Type of the user. Valid values: type_owner, type_participant.

Examples

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/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"
}

Generic JSON Response

Response

{
"envelopeId": "sample string 1",
"envelopeDocuments": [
{
"documentId": "sample string 1",
"name": "sample string 2",
"type": "sample string 3",
"uri": "sample string 4",
"order": "sample string 5",
"pages": "sample string 6",
"containsPdfFormFields": "sample string 7",
"documentFields": [
{}
]
,
"availableDocumentTypes": [
{
"type": "sample string 1",
"isDefault": "sample string 2"
}
]
,
"attachmentTabId": "sample string 8",
"display": "sample string 9",
"includeInDownload": "sample string 10",
"signerMustAcknowledge": "sample string 11",
"documentGroup": "sample string 12",
"authoritativeCopy": "sample string 13",
"errorDetails": {
"errorCode": "sample string 1",
"message": "sample string 2"
}
}
]
}

Generic XML Response

Response

<envelopeDocumentsResult 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<envelopeDocuments>
<envelopeDocument>
<attachmentTabId>sample string 8</attachmentTabId>
<authoritativeCopy>sample string 13</authoritativeCopy>
<availableDocumentTypes>
<signatureType>
<isDefault>sample string 2</isDefault>
<type>sample string 1</type>
</signatureType>
</availableDocumentTypes>
<containsPdfFormFields>sample string 7</containsPdfFormFields>
<display>sample string 9</display>
<documentFields>
<nameValue />
</documentFields>
<documentGroup>sample string 12</documentGroup>
<documentId>sample string 1</documentId>
<errorDetails>
<errorCode>sample string 1</errorCode>
<message>sample string 2</message>
</errorDetails>
<includeInDownload>sample string 10</includeInDownload>
<name>sample string 2</name>
<order>sample string 5</order>
<pages>sample string 6</pages>
<signerMustAcknowledge>sample string 11</signerMustAcknowledge>
<type>sample string 3</type>
<uri>sample string 4</uri>
</envelopeDocument>
</envelopeDocuments>
<envelopeId>sample string 1</envelopeId>
</envelopeDocumentsResult>