Skip to navigation

RequestTemplate

View as Markdown

Retrieves a specific template from the server. This method returns EnvelopeTemplate upon execution completion.

Schema

RequestTemplate
// Request all the templates as shown in linked code
DocuSignWeb.EnvelopeTemplateDefinition[] response = <templates request>;
// Request information about each template definition
foreach (DocuSignWeb.EnvelopeTemplateDefinition def in response)
{
Console.WriteLine("Retrieved template definition with ID {0}", def.TemplateID);
// Request the template specified by the template ID
DocuSignWeb.EnvelopeTemplate template = _apiClient.RequestTemplate(def.TemplateID,
false);
// Display information about the returned template
Console.WriteLine("\tRetrieved template with name \"{0}\" and with {1} pages",
template.EnvelopeTemplateDefinition.Name,
template.EnvelopeTemplateDefinition.PageCount);
}
NameSchema TypeDescription
TemplateIdDSXIdTemplate ID to return.
IncludeDocumentBytesBooleanIf true, include the document bytes of the template within the Envelope object returned.

EnvelopeTemplate

EnvelopeTemplate
NameSchema TypeDescription
EnvelopeTemplateDefinitionEnvelopeTemplateDefinitionDefines the attributes of a template. See the EnvelopeTemplateDefinition section for more information.
EnvelopeEnvelopeTemplate is contained within an Envelope object defined in the CreateEnvelope section.

MatchBox

Matchbox
NameSchema TypeDescription
PageNumberIntegerPage to put the matchbox on.
XPositionIntegerX position of the matchbox.
YPositionIntegerY position of the matchbox.
WidthIntegerWidth of the matchbox.
HeightIntegerHeight of the matchbox.

Matchboxes can be supplied with the document structure within the Envelope. They are used in the matching process when documents are uploaded for creating templates.

EnvelopeTemplateDefinition

EnvelopeTemplateDefinition
NameSchema TypeDescription
TemplateIDDSXIdUnique identifier of the template.
NameStringName of the template.
SharedBooleanIf true, the template is shared with the Everyone group in the account. If false, the template is only shared with the Administrator group.
TemplatePasswordStringPassword if the template is locked. Note: This will only be returned if the requesting user is the creator of the template.
TemplateDescriptionStringDescription of the template.
LastModifiedDateTimeLast time the template was modified.
PageCountIntegerNumber of pages in document of the template.

Rules and exceptions for RequestTemplate

  • Account_Lacks_Permissions – account does not have permissions to use this API.
  • User_Lacks_Permissions – user does not have permissions to use this API.
  • Template_Unable_To_Load – template ID provided was invalid.