Skip to content

Configuration

The configuration provided tells Cloud Document Maker how to process your request and provides additional information as to how the document should be generated. You can find a full list of configuration options below.

{
"request": {
"fileName": "Document Filename",
"returnFormat": ".docx",
"webhookUrl": ""
},
"document": {}
}

Request Level Configuration

Request level configuration is the top level of configuration that tells Cloud Document Maker how to process your request. The client ID and API key are needed to successfully authenticate the request. API keys can be found in the APIKeys table in the DocumentMaker SQL database.

SettingTypeDescription
clientIdstringThe unique client ID of the client sending the request
apiKeyValuestringThe API key for the client provided
fileNamestringThe filename for the output file. If left blank then “result” will be used as the default
returnFormatstringThe file type to return, e.g. .docx, .pdf, or .zip.

This can be used to return a single file, if all formats are required then use .zip to receive a .zip file containing all files generated.

If left blank then .zip will be used
webhookUrlstringA URL that will receive the file when the request is complete.

If this setting is provided then Cloud Document Maker will add the document to a work queue and send the result file(s) to the URL. The benefit of using a webhook is that the document will be produced but the requester does not have to wait
webhookDataobjectAn object containing any data that you wish to be sent back to the webhook endpoint when the request is finished, things like project number, and who requested the document are good examples of this

Document Level Configuration

Document-level configuration tells Cloud Document Maker how it should create your document based on the settings provided. Settings can be either set globally or for each table. If a setting is global but also set against a table then it will use the table setting in preference.

e.g.

"document": {
"global": {
"ImageSize": 400,
},
"TableOrSheetName": {
"ImageSize": 200,
"DeleteIfNoData": true
}
}
SettingTypeDescription
RecordsPerPagenumberThe number of sheets there should be on there be per page. Applies to vertical sheets only. Default 1
DeleteIfNoDatabooleanDelete the table/sheet if no data for it. Default false
ReplacementTextIfNoDatastringText to display in place of the table if there is no data for it
ImageSizenumberWidth and height of images in px
ImageWidthnumberWidth of images in px. Used instead of ImageSize
ImageHeightnumberHeight of images in px. Used instead of ImageSize
ReplacementTextIfImageNotFoundstringText to display in place of an image if the image file is not found in the asset folder
SignatureSizenumberWidth and height of signatures in px. Signatures are defined by having ‘Signature’ anywhere in the tag name
SignatureWidthnumberWidth of signatures in px. Used instead of SignatureSize
SignatureHeightnumberHeight of signatures in px. Used instead of SignatureSize
TickSizenumberThe size of ticks in px. Defaults to 30px