Introduction to Templates
Learn how to use document templates
When defining a document resource within an envelope, you have two options: using documents or templates.
Documents
If you have a PDF document ready you can simply specify the url
field in a Document resource to point to that file (or a temporal file)
Templates
SignatureAPI can generate documents programmatically from a static template combined with dynamic data.
We accept templates in the , which is widely supported by software such as Microsoft Word, Google Docs, and open-source productivity suites like LibreOffice.
Within the template, you can add fields and conditionals. These will be populated with the data provided in the data
field in a Document resource.
Example
Consider a template like this:
This Dummy Agreement is entered into by {{person.name}}, currently residing at {{person.address}}. The terms and conditions outlined in this agreement shall be governed by the laws of {{jurisdiction}}.
{{if mediation}}
Any dispute shall be resolved by mediation, with each party bearing its own costs.
{{else}}
Any dispute shall be settled by arbitration, and the arbitrator’s decision is final.
{{endif}}
When data is inserted:
You get this document:
This Dummy Agreement is entered into by Sherlock Holmes, currently residing at 221b Baker Street, London. The terms and conditions outlined in this agreement shall be governed by the laws of The United Kingdom.
Any dispute shall be settled by arbitration, and the arbitrator’s decision is final.
Was this page helpful?