Doctavian's Document Generation API lets you produce rich, data-driven documents entirely server-side. You define a template in the tools your team already uses, connect it to your data, and Doctavian handles the rendering — synchronously for fast, on-demand generation or in the background for high-volume and long-running work.
The output can be a PDF, DOCX, XLSX, XLSM, CSV, PPTX, or a native Google format. The use case can be anything: contracts, invoices, onboarding packs, compliance reports, financial summaries, or any document your business runs on.
| One-call operations | Document Solutions and Requests | |
|---|---|---|
| How | Send the template, data and output settings in a single request | Save templates, data sources and Configurations as records; create a Document Request to generate |
| Endpoints | POST /documents/document/generate, /merge, /manage — each with an /async variant | POST /documents/request/create, then poll GET /documents/request/{id}/get |
| Result | In the response (sync), or POSTed to your callback URL (async) | On the request once it is Completed, as a document record |
| Best for | Your own system decides what to generate and when; quick testing of a template | Reusable, named pipelines with a history of what was generated |
Generate Document walks through both, end to end.
A Document Template is the file that defines the structure and appearance of your output document. Templates are built in the authoring tools your team already knows — Microsoft Word (DOCX), Excel (XLSX and XLSM), PowerPoint (PPTX), Google Docs, Google Sheets, or Google Slides.
Inside the template, you place Elements — the building blocks that tell Doctavian where and how to inject data, from simple text fields to repeating tables, conditional sections, images, barcodes, QR codes, hyperlinks, and charts. Expressions add logic on top — formatting values, applying conditions, and controlling visibility dynamically at generation time. A template can produce several output formats from a single source file.
A template file can live in Doctavian Storage (uploaded with POST /documents/template/upload), on OneDrive, or on Google Drive. To reuse it by name, register it as a template record with POST /documents/template/create.
Learn about Document Templates →
Data is JSON in a fixed shape: a root data object whose members are named lists of records, with every value a string already formatted for the target locale. It can come from a file in Storage (uploaded with POST /documents/data/upload), a file on OneDrive or Google Drive, or a live API called at generation time with the GraphQL load method. Each generation reads one data source.
A Data Source is the saved, named form of that definition — a load method, a urn saying where the data is, and optional query and variables. One Data Source can be attached to several Document Solutions, so pipelines that use the same data share one definition.
A Document Solution groups the templates and Data Sources that belong together, plus one or more Configurations. A Configuration holds the output settings — file format, delivery method, path, locale, time zone, language, title, embedded data, and options such as PDF conformance or drive sharing. One solution can have several Configurations, for example a PDF to Storage and a DOCX to OneDrive.
Learn about Document Solutions →
A Document Request is one generation from a template record and a Data Source, optionally under a Configuration. It is saved with status New, generated in the background, and moves through Processing to Completed or Failed.
Generation produces a file, delivered to Storage, OneDrive or Google Drive and identified by its urn. A completed Document Request also produces a document record — metadata about the file (title, format, where it was delivered, and the template, data source, solution and request it came from), identified by its own id. The record's id and the file's urn go to different operations; see Storage and File IDs.
Doctavian Storage is a short-term exchange area, not an archive. Uploaded templates and data are used up by the first generation that reads them, whether it succeeds or fails, so upload fresh files for each run. Generated files delivered to Storage are kept for 24 hours: download them within that window, or deliver to OneDrive or Google Drive instead. See Storage and File IDs.
Templates can be Word, Excel, PowerPoint, or Google Docs, Sheets or Slides files. Each template format produces its own set of output formats, and every template can produce a PDF. Google formats are loaded from and delivered to Google Drive only. See Supported File Formats for the complete matrix and PDF settings.
Every JSON response uses the same envelope: result on success, error with a list of stable codes on failure, and an operationId to quote to support. Any externalContext object you send on a request is echoed back unchanged, so you can match responses and callbacks to your own records. See Error Handling.
Operations that produce a file report what they counted against your subscription in consumption. When a usage limit is reached, the operation fails with LIMIT_BREACH.
All data is transmitted over HTTPS and processed in isolated, per-request transactions. Files in Doctavian Storage are short-lived as described above, and output can be delivered straight to your own OneDrive or Google Drive. The platform complies with GDPR and undergoes annual penetration testing.