Document Generation using cURL

Build complex, data‑driven reports with GroupDocs.Assembly Cloud via straightforward cURL requests.

  • GroupDocs.Assembly Cloud SDK for .NET
  • GroupDocs.Assembly Cloud SDK for Java
  • GroupDocs.Assembly Cloud SDK for C++
  • GroupDocs.Assembly Cloud SDK for Go
  • GroupDocs.Assembly Cloud SDK for Node.js
  • GroupDocs.Assembly Cloud SDK for PHP
  • GroupDocs.Assembly Cloud SDK for Python
  • GroupDocs.Assembly Cloud SDK for Ruby
  • GroupDocs.Assembly Cloud SDK for Swift
Start Free Trial

GroupDocs.Assembly Cloud is a fully managed, cloud‑based document assembly service that lets developers create richly formatted documents by merging template files with structured data. The solution works with a wide range of source and output formats—including Microsoft Office, OpenDocument, PDF, HTML, and graphic formats—so you can produce contracts, invoices, proposals, reports, or any other business document on demand.

The service is accessed through a clean REST API, which makes it ideal for integration with any environment that can issue HTTP requests. When using cURL, the workflow consists of three straightforward steps:

  1. Upload the template – Place a DOCX, PPTX, HTML, or any supported template file into GroupDocs Cloud Storage via a PUT request. The template contains placeholder fields and optional generation rules written in a LINQ‑style expression language.
  2. Provide the data source – Supply the data that will populate the template as either an XML or JSON file. The data can be a simple key/value set or a complex hierarchical structure containing tables, collections, and images.
  3. Invoke the assemble endpoint – Send a POST request that includes the path to the uploaded template, the data source, and the desired output format (e.g., PDF, DOCX, HTML). The API processes the template, evaluates all expressions, embeds external content, applies formulas, and returns the assembled document directly in the response or stores it back to Cloud Storage.

Because the entire process runs in the cloud, no additional software or libraries are required on the client side—only a working cURL installation. All communication is secured with SSL/TLS, and authentication is performed using personal access keys. This approach enables rapid prototyping, batch processing via mail‑merge, and integration into CI pipelines, while keeping the implementation simple and platform‑agnostic.

The following tabs provide a quick glance at the core capabilities, the exhaustive list of supported file formats, and the operating systems and development environments that are compatible with GroupDocs.Assembly Cloud.

GroupDocs.Assembly REST API Features

Create documents from templates with placeholder fields

Bind data using LINQ‑style expressions

Support XML and JSON data sources

Embed external content, images, charts

Generate dynamic tables and lists

Insert hyperlinks and bookmarks

Apply formulas and sequential operations

Conditional content blocks (IF/ELSE)

Reusable variables for expensive calculations

Spreadsheet‑specific formula calculations

Email body attributes & attachments

Generate barcodes (QR, Code128, etc.)

Set background colors for HTML output

SSL/TLS encrypted communication

Authenticate with personal access keys

Generate a document in cURL

The snippet below demonstrates how to upload a template file and generate a document using the Assembly Cloud API. Steps:

  1. Upload the template (Input1.docx) to Cloud Storage.
  2. Call the assemble endpoint with the template path, desired output format, and data source (Input2.docx).
  3. Receive the assembled document in the requested format.
curl -v "https://api.groupdocs.cloud/v1.0/assembly/storage/file/Input1.docx" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F FileContent="@Input1.docx"
curl -v "https://api.groupdocs.cloud/v1.0/assembly/assemble" \
     -X POST \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -d '{ "TemplateFileInfo": { "FilePath": "@Input1.docx" }, "SaveFormat": "docx", "ReportData": "@Input2.docx" }'

Support and Learning Resources

GroupDocs.Assembly Cloud also offers individual SDKs for the platforms listed below:

  English
5f5c5ef