Generate document from uploaded file

This endpoint allows API users to generate a PDF document by uploading a .docx file with tags.

In development mode, downloaded generated documents will include a watermark.

Learn more about document generation.

post/v2/document-generations/upload

Request

Request body multipart/form-data

filestring binary required

The .docx file to upload. Maximum size: 10 MB.

datastring required

A JSON string containing variable mappings. Keys correspond to tag names in the .docx template; values are the pre-filled text for each tag. Supports arrays of objects for repeating sections, such as tables and lists. Example for a document with a Products table: {"Products": [{"ItemPrice": "8", "ItemName": "T-shirt", "ItemQuantity": "10"}, {"ItemPrice": "4", "ItemName": "Belt", "ItemQuantity": "5"}, {"ItemPrice": "20", "ItemName": "Dress", "ItemQuantity": "2"}]}.

single_documentboolean

If true, a single document is generated. If false, a document group is generated.

Response

Successful response.

Changes

No recorded changes to this operation across all 1 revision of this API.