Datawise Logo

Docs

API Documentation

Version 1.0.0

DataWise Document Exchange

API v1.0.0

DataWise Document Exchange API

Transform your document workflows with a powerful API that handles document generation, conversion, and e-signatures

The DataWise Document Exchange API is your all-in-one solution for programmatic document generation. Upload DOCX templates with dynamic placeholders, inject data and images, generate tables from arrays, convert to PDF, add legally-binding e-signatures, and merge multiple PDFs - all through a single powerful endpoint.

Examples of What You Can Build

These are just a few examples - the API can handle any document automation need!

Invoice Generation

Automate invoice creation with dynamic pricing tables and customer data

Contract Management

Generate contracts and collect signatures without manual intervention

Certificate Issuance

Create personalized certificates at scale for courses and events

Reports & Analytics

Generate dynamic reports with tables, charts, and real-time data

Proposals & Quotes

Create professional proposals and quotes with custom branding

API Endpoint

POSThttps://api.datawise.app/api/datawise_document_exchange

All document generation, conversion, and e-signature operations are performed through this single endpoint.

Key Capabilities

Dynamic Document Generation

Replace placeholders in DOCX templates with dynamic data using simple [[variable]] syntax

Image Injection

Dynamically insert images with custom sizing and positioning using [[%imageTag]] markers

Loop/Array Processing

Generate tables and lists from array data using [[#arrayName]] syntax for dynamic content

E-Signature Integration

Add legally binding e-signatures with multi-signer support and status tracking

Setup in Dashboard

PDF Merging

Combine multiple PDFs in a specified order with the &structure parameter

Quick Start

  1. Create your account

    Go to https://go.datawise.app and sign up for a free account. Then create your first application to get an API key.

  2. Create your DOCX template

    Create a DOCX template with placeholders like [[firstName]], [[%logo]] for images, and [[#items]] for loops.

  3. Make a POST request

    Send your template file (ddx_template), dynamic data parameters, and output format (ddx_outputFormat) to the API endpoint with your API key.

  4. Receive your generated document

    Get back your dynamically generated document as DOCX or PDF, with all placeholders filled, images inserted, and tables generated - ready for distribution or signature collection.

Request Format

Content Type

multipart/form-data

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Quick Example

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_template=@template.docx" \
  -F "ddx_outputFormat=pdf" \
  -F "firstName=John" \
  -F "lastName=Doe"

Response Formats

Success Response

Returns: ArrayBuffer (binary data representing the generated DOCX or PDF file)

// Response object properties
{
  status: 200,
  statusText: 'OK',
  headers: Headers { 'content-type': 'application/octet-stream', ... },
  body: ReadableStream,
  ok: true
}

// Access the document data
const documentBuffer = await response.arrayBuffer();
// Save or process the binary document data

E-Signature Response

{
  "status": "success",
  "signatureRequestId": "sig_xyz789",
  "signers": [
    {
      "email": "john@example.com",
      "status": "pending"
    }
  ],
  "documentUrl": "https://api.datawise.app/sign/xyz789"
}

Error Response

Returns: Response object with error details in JSON format. Error message structure may vary depending on the type of error.

// Response object properties
{
  status: 400,
  statusText: 'Bad Request',
  headers: Headers { 'content-type': 'application/json', ... },
  body: ReadableStream,
  ok: false
}

// Parse the error message
const errorData = await response.json();

// errorData example:
{
  error: {
    code: 'VALIDATION_ERROR',
    message: 'Validation error description',
    details: { errorCode: 'VALIDATION_ERROR' },
    timestamp: '2025-10-02T16:27:54.846Z',
    correlationId: '6a4kf9nkepp7'
  }
}

Parameter Prefixes

PrefixPurposeExample
NoneStandard dynamic datafirstName=John
%Dynamic images%logo_200x100=image.png
#Loops/Arrays#products=[...]
&PDF Merging&cover=file.pdf
ddx_System parametersddx_template / ddx_outputFormat
ddxE_E-signatureddxE_signers / ddxE_senderEmail

Ready to integrate?

Check out our detailed parameter documentation and code examples to get started.

© Copyright 2026, Datawise Document Exchange.