
Docs
Version 1.0.0
DataWise Document Exchange
API v1.0.0
Important
ddx_template and ddx_outputFormat are required for template-based document generation. ddx_templateRequiredFile UploadUpload a DOCX template file directly in your API request. The template should contain placeholders for dynamic data injection.
Format: multipart/form-data file upload
Use [[placeholders]] in your template for dynamic text, [[%imageTag]] for images, and [[#arrayName]] for loops.
ddx_outputFormatRequiredSpecifies the output format for the generated document.
Note: Must be pdf when using e-signature functionality.
Important Syntax Rule
[[firstName]] NOT [[ firstName ]]. Use camelCase or snake_case for placeholder names. Replace [[placeholders]] in your template with dynamic values.
Template: [[firstName]] [[lastName]]
API: firstName=John&lastName=Doe
→ Output: John Doe
| Example Key | Example Value | Template Placeholder |
|---|---|---|
| firstName | John | [[firstName]] |
| companyName | Acme Corp | [[companyName]] |
| invoiceNumber | INV-2024-001 | [[invoiceNumber]] |
| currentDate | 2024-01-15 | [[currentDate]] |
Inject images dynamically with size and position control.
Key Format:
%tagName_widthxheightExample Keys:
%logo_200x100%signature_150x50%photo_300x400Value Types:
https://example.com/image.png[[%tagName]] - the image size is specified in the API key. The position will depend on where you put the image marker in the template. Generate tables and lists from array data.
API Parameter Example:
#products=[
{"name": "Product A", "price": 29.99, "qty": 2},
{"name": "Product B", "price": 49.99, "qty": 1}
]Template Syntax:
[[#products]] Product: [[name]] Price: $[[price]] Quantity: [[qty]] [[/products]]
In template, use loop syntax with [[#arrayName]] to start and [[/arrayName]] to end. Access properties of each item directly within the loop.
Merge multiple PDFs with your generated document.
| Parameter | Type | Description |
|---|---|---|
| &cover | PDF File | Cover page PDF |
| &appendix | PDF File | Appendix PDF |
| &terms | PDF File | Terms & conditions PDF |
| &structure | JSON Array | Merge order: cover, content, appendix (as JSON array) |
&structure to define the order of PDFs. "content" represents the generated document. ddxE_ prefix. Output format must be pdf when using e-signatures. Template Syntax Warning
[[_signature_client]] NOT [[ _signature_client ]]| Parameter | Type | Description |
|---|---|---|
| ddxE_signers | JSON String | Array of signer objects with signerRole, signerEmail, signerName, and required fields |
| ddxE_senderEmail | Email address of the document sender (your email) |
The ddxE_signers parameter accepts a JSON array of signer objects:
ddxE_signers=[
{
"signerRole": "client",
"signerEmail": "john@example.com",
"signerName": "John Doe",
"required": ["signature", "date"]
},
{
"signerRole": "witness",
"signerEmail": "jane@example.com",
"signerName": "Jane Smith",
"required": ["signature", "initials", "name", "date"]
}
]Required Fields Options:
Template Marker Format:
The marker format is [[_<field>_<role>]] where <role> matches the signerRole from your API payload. Each signer can have up to 4 types of markers:
| Template Marker | Description | Matches |
|---|---|---|
| [[_signature_client]] | Signature placement | signerRole: 'client', required: ['signature'] |
| [[_initials_client]] | Initials placement | signerRole: 'client', required: ['initials'] |
| [[_name_client]] | Typed name placement | signerRole: 'client', required: ['name'] |
| [[_date_client]] | Date placement | signerRole: 'client', required: ['date'] |
Example for One Signer (Client):
Signature: [[_signature_client]] Name: [[_name_client]] Initials: [[_initials_client]] Date: [[_date_client]]
Example for Two Signers (Client and Witness):
Client Signature: [[_signature_client]] Client Name: [[_name_client]] Client Initials: [[_initials_client]] Client Date: [[_date_client]] Witness Signature: [[_signature_witness]] Witness Name: [[_name_witness]] Witness Initials: [[_initials_witness]] Witness Date: [[_date_witness]]
signerRole: "partyA" would use markers like [[_signature_partyA]]). Ensure the role in your API payload matches the role in the template markers. | Parameter | Type | Description |
|---|---|---|
| ddxE_emailMessage | String | Custom message in the signature request email |
| ddxE_signPreview | Boolean String | Set to ``true`` for preview mode (no emails sent) |
| ddxE_webhookUrl | URL | Webhook endpoint for signature status updates |
| ddxE_encrypted_url | String | Base64 encrypted callback URL for completion |
Testing E-Signatures
ddxE_signPreview=true to test your e-signature integration without sending actual emails. ^[A-Za-z0-9-_]+$ddx_template must be a valid DOCX fileddx_outputFormat is always required[[firstName]] not [[ firstName ]]ddxE_signers is provided, ddxE_senderEmail is requiredpdf when using e-signatures© Copyright 2026, Datawise Document Exchange.