Generate document from URL

This endpoint allows API users to generate a PDF document by providing a publicly accessible URL to a .docx file with tags.

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

Learn more about document generation.

post/v2/document-generations/url

Request

Request body

dataobject required

An object 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 (e.g., tables, lists).

docx_urlstring required

Publicly accessible URL to the .docx file.

single_documentboolean

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

Example request

{
  "data": {
    "Products": [
      {
        "ItemName": "T-shirt",
        "ItemPrice": "8",
        "ItemQuantity": "10"
      },
      {
        "ItemName": "Belt",
        "ItemPrice": "4",
        "ItemQuantity": "5"
      },
      {
        "ItemName": "Dress",
        "ItemPrice": "20",
        "ItemQuantity": "2"
      }
    ]
  },
  "docx_url": "https://example.com/template.docx"
}

Response

Successful response.

Changes

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