Sign in

Document generation for Dynamics 365 — and anything that can POST JSON

Documents typeset by LaTeX, versioned like code.

DocGen renders PDFs from JSON through LaTeX templates that live in a Git repository — branches are your environments, publishing pins a commit, and every document records the exact template revision that produced it.

T4 + LaTeX templates · Git branches as environments · sandboxed compiles · only production renders are billed

An invoice PDF typeset by the DocGen engine: letterhead, itemized table with rules, VAT summary, and payment details.
Real output, not a mock-up — the sample invoice.tt template rendered by the engine from JSON, stamped with template commit eb46188.

How it works

  1. Write the template once

    Templates are T4 over LaTeX, committed to your tenant's Git repository. They bind to arbitrary JSON — no fixed schema, no per-entity classes — and document math (totals, VAT) is computed right in the template.

    \newcommand{\eur}[1]{#1\,\euro}
    <# foreach (var line in Model["items"].Items) { #>
      <#= Tex.E(line["description"].Str) #>
        & <#= line["qty"].Int #>
        & \eur{<#= Money(line["unitPrice"].Dec) #>} \\
    <# } #>
  2. Publish to pin a revision

    Branches are environments (dev/test/live by default — add your own). Publishing pins the branch tip into an immutable bundle; production renders resolve the pin, never a moving branch HEAD.

    POST /v1/workspaces/publish?environment=live
    → { "environment": "live", "commitSha": "eb461887…" }
  3. Send data, get the PDF

    One authenticated request with your JSON payload. The compile runs in a sandboxed worker; poll the job and download the finished document.

    POST /v1/documents
      { "templateId": "invoice",
        "environment": "live", "data": { … } }
    → 202 { "jobId": "3c013c9d-…" }
    
    GET /v1/documents/{id}/content → PDF

What you can rely on

Reproducible by construction
A render never depends on "whatever the branch looks like right now". It uses the pinned publish, and the commit SHA is stored on the document record — you can always answer "which template produced this?"
Sandboxed compiles
Templates are code, so every compile runs in an isolated child process: no network, read-only filesystem, scrubbed environment, hard CPU, memory, and wall-clock limits. Shell escape is off at the TeX level too.
Metered exactly once
Only successful renders on live count. Development, test, workbench previews, and CI compiles are free, and metering is idempotent on the job id — a retried job can never bill twice.
No lock-in
Your templates live in a plain Git repository with your history — clone it and leave any time. The API is plain JSON over HTTPS; the Dynamics 365 connector is just one caller among many.
E-invoicing built in
Templates can carry an EN 16931 mapping: the same render then produces a ZUGFeRD/Factur-X hybrid PDF plus the standalone XRechnung-ready XML, schema-validated before anything is delivered.

Pricing that follows how you actually work

Pay for documents, not seats
A tiered subscription with a volume of production documents included and a per-document overage above it. No per-user fees — invite your whole team.
Only production counts
A document is billed exactly once, only when it renders successfully on the live environment. Development, test, previews, failed renders and CI compiles are always free — build and iterate at no cost.
Fair use, clearly drawn
Non-production environments are for developing and testing templates: their output is watermarked as a draft, kept for a limited retention window, and covered by a generous monthly fair-use allowance. Production documents come from live — that's the whole deal.
Verifiable to the document
The portal's Usage page lists every billable render with its job id and timestamp — your invoice reconciles against data you can see, not a number you have to trust.

Starter

€19 / month

50 live documents included

then €0.40 per extra document

Growth

€99 / month

750 live documents included

then €0.20 per extra document

Scale

€399 / month

5,000 live documents included

then €0.10 per extra document

Enterprise

Custom

Volume pricing & onboarding — contact us

Only successful live renders count toward your plan — dev, test, previews and CI compiles are always free. Questions about volume or an annual plan? Talk to us for a guided pilot with your own templates.

The whole integration, in one request

curl -X POST https://api.docs.0-7.xyz/v1/documents \
  -H "X-Api-Key: dk_…" \
  -H "Content-Type: application/json" \
  -d '{
        "templateId": "invoice",
        "environment": "live",
        "data": { "client": { "name": "Contoso Retail AG" }, "items": [ … ] }
      }'

Poll GET /v1/documents/{id} for state and the stamped template commit; fetch the PDF from /content. Retries are safe — send an Idempotency-Key header and a repeated submission returns the original job. Full reference with every endpoint, request and response shape: /docs.