Last updated 2016-08-10 20:37:29 UTC

The DownloadTemplate operation can be used to download the underlying PDF for a document template. This operation should not be used with workflow-only templates.

The DownloadTemplate operation requires knowledge of the following:

  • the AssureSign account ContextIdentifier (this is exposed in the AssureSign administrative application account settings and serves to provide some security to the transaction)
  • The TemplateId that uniquely identifies the document template for which the underlying PDF is being downloaded.
  • The AssureSign UserName of the user requesting the template PDF download.

Sample XML

<?xml version="1.0" encoding="utf-8"?> 
<DownloadTemplate xmlns=""> 
    <DownloadTemplateRequest ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" TemplateId="2CE11EF1-8938-DD11-8735-00065B8CE99B" UserName="" /> 

The SOAP Action header is

A response will return the TemplateId along with the actual file data for the template PDF.

The DownloadTemplate operation exposes two endpoints allowing it to be executed using either the W3C standard Message Transmission Optimization Mechanism (MTOM) protocol or not. If the MTOM endpoint is used, the returned template PDF will be passed in its original raw binary form using XML-binary Optimized Packaging (XOP). If the non-MTOM endpoint is used, this PDF will be Base64-encoded and included directly in the response XML itself.

Sample XML (non-MTOM) returned by the DownloadTemplate operation is presented here:

<?xml version="1.0" encoding="utf-8"?> 
<DownloadTemplateResponse xmlns=""> 
    <DownloadTemplateResult TemplateId="2CE11EF1-8938-DD11-8735-00065B8CE99B"> 

The DownloadTemplateResult should be checked for the presence of an Exceptions element, which may contain multiple DownloadTemplateException items.