This returns a list of the server-side templates, their name and ID, used in an envelope.

Request

HTTP request

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

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

envelopeIdstring

The envelope's GUID. (For example, 93be49ab-afa0-4adf-933c-f752070d71ec).

Optional Query Parameters
includestring

The possible value is matching_applied, which returns template matching information for the template.

Responses

CodeDescriptionReference
200

Successful response.

EnvelopeTemplates
400

Error encountered.

errorDetails

SDK Method

Envelopes::listTemplates

Definitions

errorDetails

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

errorCodestring

A 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

Object that describes errors that occur. Only valid for responses; 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

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