EnvelopeTemplates: listByDocument

Retrieves the templates associated with a document in the specified envelope.

Request

HTTP request

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

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.

envelopeIdstring

The envelope's GUID.

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

Optional Query Parameters
includestring

A comma-separated list that limits the results. Valid values are:

  • applied
  • matched

Responses

CodeDescriptionReference
200

Successful response.

EnvelopeTemplates
400

Error encountered.

errorDetails

SDK Method

Envelopes::listTemplatesForDocument

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.

templateMatch

documentEndPagestring

documentStartPagestring

matchPercentagestring

templateSummary

Summary of a template request.

appliedstring

Reserved for DocuSign.

documentIdstring

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

documentNamestring

The name of the document.

errorDetailserrorDetails

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

namestring

The name of the template.

templateIdstring

The unique identifier of the template. If this is not provided, DocuSign will generate a value.

templateMatchtemplateMatch

uristring

A URI containing the user ID.

EnvelopeTemplates

Envelope templates

templates[templateSummary]

An array of templateSummary objects that contain information about templates.

Examples

Generic JSON Response

Response
{
  "templates": [
    {
      "templateId": "sample string 1",
      "name": "sample string 2",
      "documentId": "sample string 3",
      "documentName": "sample string 4",
      "applied": "sample string 5",
      "templateMatch": {
        "matchPercentage": "sample string 1",
        "documentStartPage": "sample string 2",
        "documentEndPage": "sample string 3"
      },
      "uri": "sample string 6"
    }
  ]
}
Generic XML Response

Response
<templateInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <templates>
    <templateSummary>
      <applied>sample string 5</applied>
      <documentId>sample string 3</documentId>
      <documentName>sample string 4</documentName>
      <name>sample string 2</name>
      <templateId>sample string 1</templateId>
      <templateMatch>
        <documentEndPage>sample string 3</documentEndPage>
        <documentStartPage>sample string 2</documentStartPage>
        <matchPercentage>sample string 1</matchPercentage>
      </templateMatch>
      <uri>sample string 6</uri>
    </templateSummary>
  </templates>
</templateInformation> 
}} />