Contracts: mail merge
Compose any contract from your own template, its placeholder vocabulary and the values for this time, with real pagination.
It is the most frequently asked about, so it gets its own page.
A contract here is three things: the body with placeholders in double curly braces, the vocabulary that explains what each placeholder is, and the values for this time.
{
"type": "contrato",
"data": {
"title": "Contrato de prestación de servicios",
"number": "PS-0007",
"catalog": [{ "key": "contratante", "label": "Contratante", "grupo": "Partes" }],
"values": { "contratante": "Empresa Cliente S.A.S" },
"body": "<h1>…</h1><p>Entre <strong>{{contratante}}</strong>…</p>",
"signatures": [
{ "nombre": "{{contratante}}", "documento": "NIT 901234567-8",
"representante": "Laura Restrepo Ochoa", "rol": "El contratante" }
]
}
}
Who does what
| Us | You | |
|---|---|---|
| Placeholder engine, pagination, typography, signatures | Yes | No |
| Your templates | No | Yes, you store and version them |
The vocabulary (canon_mensual, arrendatario…) |
No | Yes, it travels with every call |
| The values of each contract | No | Yes |
The engine doesn’t know what a rent (canon) is, and that is deliberate: it is why the same call serves a lease, an employment contract and a handover record without us needing to know anything about anyone’s business. Your templates are yours, they stay in your system and only pass through ours to be drawn.
Four things about the body
- The HTML is a closed subset:
h1–h3,p,strong/b,em/i,u,ul/ol/li,table/tr/th/td,hr,brand<div class="salto-de-pagina">to force a new page. Any other tag is rejected, saying which one. Accepting “HTML” without limits means maintaining a browser, and a badly drawn contract isn’t discovered until someone signs it. - A placeholder without data is printed as is —
{{canon_mensual}}— instead of being replaced with an “N/A”. A visible gap gets corrected before signing; an “N/A” ends up printed on a real contract. - Signatures also accept placeholders, and
representanteis the person who actually signs when the signing party is a company: it is the data checked against the certificate of incorporation and legal representation. - The document truly paginates. It is not an image: the text can be selected, searched and copied, the header repeats on every page and the footer numbers them. The commercial lease in the docsgen catalog is eleven pages with three annexes.
Example: contrato.json.
