v3
latestOpenAPI 3.0.02026-07-31162156.9 KBJourneys
generateDocument
Builds document generated from a template with journey values."
Supported input document types:
- .docx
Supported output document types:
- .docx but limited to only text based variables
Uses Document API to generate the document. Uses Template Variables API to replace variables in the document.
post/v1/journey/document:generate
Request body
Example request
{
"file_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
"language": "de"
}Response
Generated document output
Example response
{
"pdf_output": {
"preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",
"output_document": {
"s3ref": {
"bucket": "document-api-preview-prod",
"key": "preview/my-template.pdf"
}
}
},
"docx_output": {
"preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",
"output_document": {
"s3ref": {
"bucket": "document-api-preview-prod",
"key": "preview/my-template.docx"
}
}
},
"template_settings": {
"custom_margins": {
"top": 2.54,
"bottom": 2.54
},
"suggested_margins": {
"top": 2.54,
"bottom": 2.54
},
"display_margin_guidelines": true,
"file_entity_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}
}