Build highly‑customized reports, contracts, invoices and more directly from the command line with GroupDocs.Assembly Cloud.
Start Free TrialGroupDocs.Assembly Cloud API lets you generate documents of any complexity from templates and data sources. Using cURL you can upload a template, bind XML/JSON data, and retrieve the assembled file in the format you need – DOCX, PDF, HTML, PNG, SVG and many more.
The following snippet uploads a DOCX template and assembles a report in DOCX 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"
}'