Document
Overview
A Document resources represents the template configuration for
Fields
Field | Type | Description |
---|---|---|
id | String | The ID of the document. |
documentType | String | The type of document for this template. This will either be the value |
file | The Google File that is a template document within the workflow. This file will be copied to create the output document. | |
outputName | String | A templated string used to generate the name for the output created from this template. |
createPDFCopy | Boolean | A flag to enable creating a PDF copy of the output document. |
removeOutput | Bolean | A flag to enable removing the original output document (Google Docs/Slides) files after a PDF copy has been made. |
enablePdfPassword | Boolean | A flag to enable pdf encryption of the created PDF. |
pdfPassword | String | A templated string used to generate the password for the PDF. Only used if the `enablePdfPassword` flag is enabled. |
PdfPasswordPreventCopy | Boolean | A flag to prevent content of the PDF being copied when the PDF is protected with a password. |
previewUrl | String | A url to the embedded editor used for non-Portant users changes to this document using source fields. It is assumed these users can access the associated Google File. NOTE: This feature has not yet been implemented and my be subject to change. |
Example
Endpoints
List all Documents for a Workflow
List all documents of the specific workflow as specified by the id.
Responses
Status | Body |
---|---|
200 OK | Array<Document> |
403 Unauthorised | Error |
Create a Document for a Workflow
Create a new document for the specified workflow.
Request
A create Document object as JSON.
The payload may contain an optional file_id
field with a file ID for a file in Google Drive that the requesting user has access to.
Alternatively, the file_id
can be omitted in order to create a new document.
Responses
Status | Body |
---|---|
201 Created | Document |
400 Bad Request | Error |
403 Unauthorised | Error |
Get a Document
Retrieve a specific document of a specific workflow.
Responses
Status | Body |
---|---|
200 OK | Document |
403 Unauthorised | Error |
Update a Document
Update a specific document as specified by its id.
Request
A partial Document object as JSON.
The payload may contain an of the editable fields of the document. Note, the selected file for a document can not be changed once it is created.
Responses
Status | Body |
---|---|
200 OK | Document |
400 Bad Request | Error |
403 Unauthorised | Error |
Last updated