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.
| Setting | Type | Description |
|---|---|---|
| clientId | string | The unique client ID of the client sending the request |
| apiKeyValue | string | The API key for the client provided |
| fileName | string | The filename for the output file. If left blank then “result” will be used as the default |
| returnFormat | string | The 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 |
| webhookUrl | string | A 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 |
| webhookData | object | An 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 }}| Setting | Type | Description |
|---|---|---|
| RecordsPerPage | number | The number of sheets there should be on there be per page. Applies to vertical sheets only. Default 1 |
| DeleteIfNoData | boolean | Delete the table/sheet if no data for it. Default false |
| ReplacementTextIfNoData | string | Text to display in place of the table if there is no data for it |
| ImageSize | number | Width and height of images in px |
| ImageWidth | number | Width of images in px. Used instead of ImageSize |
| ImageHeight | number | Height of images in px. Used instead of ImageSize |
| ReplacementTextIfImageNotFound | string | Text to display in place of an image if the image file is not found in the asset folder |
| SignatureSize | number | Width and height of signatures in px. Signatures are defined by having ‘Signature’ anywhere in the tag name |
| SignatureWidth | number | Width of signatures in px. Used instead of SignatureSize |
| SignatureHeight | number | Height of signatures in px. Used instead of SignatureSize |
| TickSize | number | The size of ticks in px. Defaults to 30px |