Generates a document by merging one or more templates with data collected from multiple sources.
EXAMPLE I: Merging a single XAuthor template with data fetched from Conga Platform and generating a PDF document as output.
Request:
POST /documents/generate
{
"data": [
{
"entityId": "3ff0e051-d655-451d-abb5-a71b202cb935",
"entityName": "Agreement"
}
],
"templates": [
{
"id": "79d97cc6-933b-4f2f-95b6-a64d3349f3ac"
}
],
"outputConfig": {
"outputFormat": 1, // 0 -> DOCX 1 -> PDF
"fileName": "OutputDocument"
}
}
Response:
{
"job": {
"status": 0,
"errorReason": null,
"id": "64d30d4a-5c89-4d9f-a5c8-b8453af5c280",
"createdDate": "2023-07-15T12:41:27.1363101Z",
},
"success": true,
"statusCode": 202,
"message": "Successfully queued the request"
}
EXAMPLE II: Merging a single XAuthor template with inline data passed in the request and generating a PDF.
Request:
POST /documents/generate
{
"data": [
{
"entityId": "ffe71825-6212-4438-866e-b0a7785d9e0d",
"entityName": "ProductConfiguration",
"Data": "[{"ObjectName":"ProductConfiguration","Result":[{"Id":"481450d8-9e7c-4dd7-898f-ae8cb1691b94","Name":"481450d8-9e7c-4dd7-898f-ae8cb1691b94"}]},{"ObjectName":"LineItem","Result":[{"Id":"553dc3ad-4a9a-4eb2-960e-7bb2b19e0727","Name":"Conga Water Bottle","Description":"Stay hydrated on the ice-cold tears of your competition.","Quantity":1,"Product":{"Id":"9b319b18-1916-4858-b4e8-4ee2b55f83e5","Name":"Conga Water Bottle","Description":null},"Configuration":{"Id":"481450d8-9e7c-4dd7-898f-ae8cb1691b94","Name":"481450d8-9e7c-4dd7-898f-ae8cb1691b94"}}]}]"
}
],
"templates": [
{
"id": "950039fe-3ca3-49be-ba89-6d8999083a28"
}
],
"outputConfig": {
"outputFormat": 1,
"fileName": "OutputDocument"
}
}
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
