Document Generation

Fill and generate a batch of documents

Changed on

Fills the documents as POST /v1/doc-gen/drafts does and generates a Word file and, where PDF conversion is available, a PDF for each. The batch is returned while it runs; poll GET /v1/doc-gen/jobs/{id}. The request is refused with 422 while documents leave fields empty, unless allow_missing is true (empty fields are then left out of the document). With dry_run, no batch is created and job is null. Unless save_to_workspace is false, the files are kept; otherwise they are deleted 24 hours after generation. Requires a person at or above member behind the key.

post/v1/doc-gen/jobs

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Request body

DocGenGenerateRequest required

Name a template with template_id (and with_pair) or an explicit set with template_ids.

template_id, string uuid
template_ids, string[]
with_pair, boolean

Also generate the template's companion.

data_product_id, string uuid required
record_ids, string[] required

Row ids of the data product.

values, object

Values for every document by field key. A field entered per document takes the value as entered, a passage decided per document takes yes or no, and any other field takes it as an edit over the fill.

documents, DocGenDocumentValues[]

Values for single documents; they win over values.

profile, object

The writer's details for this batch only (name, kuerzel, titel, bereich, unterschrift); the saved profile is unchanged.

save_to_workspace, boolean

When false, the files are deleted 24 hours after generation.

allow_missing, boolean

Generate although some documents leave fields empty.

dry_run, boolean

Response

The filled documents and the batch.

DocGenGenerateResult required
dry_run, boolean
documents, DocGenDraft[]
job, DocGenJob nullable

The batch; null with dry_run.

Changes