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

Request

HTTP request

GET /v2/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. Eg 93be49ab-afa0-4adf-933c-f752070d71ec

Optional Query Parameters
includestring

The possible values are: matching_applied - This 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

An error code associated with the error.

messagestring

A short error message.

templateMatch

documentEndPagestring

documentStartPagestring

matchPercentagestring

templateSummary

appliedstring

Reserved: TBD

documentIdstring

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

documentNamestring

namestring

templateIdstring

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

templateMatchtemplateMatch

uristring

EnvelopeTemplates

Envelope templates

templates[templateSummary]

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