Documents#
Documents enable you to organize and review data in collaborative files with linked text, documents, and images. Use these endpoints to manage documents and their sections in the Workiva Platform.
Document#
Details about the document, including its ID and name
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
created |
When the action was performed, and details about the user who did it |
read-only |
|
id |
string |
The unique identifier of the document |
read-only |
modified |
When the action was performed, and details about the user who did it |
read-only |
|
name |
string |
Name of the document |
read-only |
sections |
[Section] |
An array of information about the sections in the document. Included in the response only when the $expand query parameter is provided. |
read-only |
template |
boolean |
Whether the document is a template |
read-only |
Example#
{
"created": {
"dateTime": "2021-05-13T20:41:35Z"
},
"id": "124efa2a142f472ba1ceab34ed18915f",
"modified": {
"dateTime": "2021-07-07T16:44:54Z"
},
"name": "Example Company 10-K",
"sections": [
{
"children": [],
"id": "124efa2a142f472ba1ceab34ed18915f_18",
"index": 0,
"name": "Introduction",
"parent": null
}
],
"template": false
}
DocumentExport#
Details about the document export, including its format and options
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
docxOptions |
Optional options to export the document as a Microsoft Word document (.DOCX). If no options are provided, all options default to False. |
||
format |
string |
The file format to export the document as. |
required |
pdfOptions |
DocumentToPdfOptions¦null |
Optional options to export the document as a portable document file (.PDF). If no options are provided, all options default to False. |
|
sections |
[string] |
The IDs of the sections of the document to export. Omit to export the entire document. |
|
xhtmlOptions |
Optional options to export the document as .XHTML. If no options are provided, |
Enumerated Values#
Property |
Value |
|---|---|
format |
|
format |
|
format |
|
Example#
{
"docxOptions": {
"includeLeaderDots": true,
"showTableCellShading": true
},
"format": "docx",
"sections": [
"a8b3adb687644b27fafcb3a9875f0f0d_18",
"a8b3adb687644b27fafcb3a9875f0f0d_19"
]
}
DocumentLockType#
The type of the document lock.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
anonymous |
string |
The type of the document lock. |
Enumerated Values#
Property |
Value |
|---|---|
anonymous |
|
Example#
"locked"
DocumentRef#
A reference to a document
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
document |
string |
The unique identifier of the document being referred to |
read-only |
location |
string¦null |
❗️ Deprecated: A URL that a GET request can be made against to retrieve this document |
read-only |
revision |
Identifies a unique revision of content. The same revision can be used for any content request within a file because revisions are allocated at the file-level. |
read-only |
Example#
{
"document": "16b1f641613847469b7aa1ca29af40b1",
"location": "<opaque_url>",
"revision": "2B3C4D5E"
}
DocumentsListResult#
Returns a JSON object with data and @nextLink properties. data contains a list of Document objects, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn’t appear. If the request returns no results at all, data contains an empty array.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
@nextLink |
string |
Pagination link for next set of results |
|
data |
[Document] |
Details about the document, including its ID and name |
required |
Example#
{
"@nextLink": "<opaque_url>",
"data": [
{
"created": {
"dateTime": "2021-05-13T20:41:35Z"
},
"id": "124efa2a142f472ba1ceab34ed18915f",
"modified": {
"dateTime": "2021-07-07T16:44:54Z"
},
"name": "Example Company 10-K",
"sections": [
{
"children": [],
"id": "124efa2a142f472ba1ceab34ed18915f_18",
"index": 0,
"name": "Introduction",
"parent": null
}
],
"template": false
}
]
}
DocumentToDocxOptions#
Optional options to export the document as a Microsoft Word document (.DOCX). If no options are provided, all options default to False.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
includeLeaderDots |
boolean |
Whether to include leader dots when exporting to .DOCX. False by default. |
|
showTableCellShading |
boolean |
Whether to show table cell shading when exporting to .DOCX. False by default. |
Example#
{
"includeLeaderDots": true,
"showTableCellShading": true
}
DocumentToPdfOptions#
Optional options to export the document as a portable document file (.PDF). If no options are provided, all options default to False.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
includeAlternateRowFill |
boolean |
Whether to include alternate row fill when exporting to .PDF. False by default. |
|
includeAttachmentLabels |
boolean |
Whether to include attachment labels when exporting to .PDF. False by default. |
|
includeComments |
boolean |
Whether to include comments when exporting to .PDF. False by default. When True, all comments are included, even those already resolved. |
|
includeDraftWatermark |
boolean |
Whether to include a “Draft” watermark when exporting to .PDF. False by default. |
|
includeHyperlinks |
boolean |
Whether to include hyperlinks when exporting to .PDF. False by default. |
|
includeLeaderDots |
boolean |
Whether to include leader dots when exporting to .PDF. False by default. |
|
includeTrackChanges |
boolean |
Whether to include track changes when exporting to .PDF. False by default. |
|
removeSpaceFromPartialExport |
boolean |
Whether to remove space from partial exports when exporting to .PDF. False by default. |
|
tagForWebAccessibility |
boolean |
Whether to tag for web accessibility when exporting to .PDF. False by default. |
|
useCmykColorspace |
boolean |
Whether to use CMYK colorspace when exporting to .PDF. False by default. |
Example#
{
"includeAlternateRowFill": true,
"includeAttachmentLabels": true,
"includeComments": true,
"includeDraftWatermark": true,
"includeHyperlinks": true,
"includeLeaderDots": true,
"includeTrackChanges": true,
"removeSpaceFromPartialExport": true,
"tagForWebAccessibility": true,
"useCmykColorspace": true
}
DocumentToXhtmlOptions#
Optional options to export the document as .XHTML. If no options are provided, editableXhtml will be true and all other options will be false.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
editableSimple |
boolean |
Whether to produce simplified editable XHTML. This option produces editable XHTML that is simpler than the editableXHTML option. Use this option when you only need the textual and numeric content of a document, but not any of the images or complex formatting. When this option is true, all other XHTML export options must be false. |
|
editableXhtml |
boolean |
Whether the resulting XHTML is editable when exporting to .XHTML. False by default. If set to true, other options must be false. |
|
includeExternalHyperlinks |
boolean |
Whether to include external hyperlinks when exporting to .XHTML. False by default. |
|
includeHeadersAndFooters |
boolean |
Whether to include the headers and footers when exporting to .XHTML. False by default. |
Example#
{
"editableSimple": true,
"editableXhtml": true,
"includeExternalHyperlinks": true,
"includeHeadersAndFooters": true
}
Section#
Details about the section, including its ID and name.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
children |
[Section] |
An array of partial information about any sections within the section |
read-only |
id |
string |
The unique identifier of the section |
|
index |
integer |
The integer index of the section relative to its parent section (or to the document if no parent section). The special value -1 may be used to position a section at the end of its siblings list. |
read-only |
name |
string |
The name of the section |
|
nonPrinting |
boolean |
Whether or not the section is non-printing |
|
parent |
Section¦null |
The section’s ID and name |
Example#
{
"id": "a8b3adb687644b27fafcb3a9875f0f0d_18",
"name": "Risk factors",
"nonPrinting": false,
"parent": null
}
SectionCopy#
Details about the destination document and, optionally, the destination section.
Properties#
Name |
Type |
Description |
Restrictions |
|---|---|---|---|
document |
string |
The unique identifier of the document to copy a section into |
required |
sectionIndex |
integer |
The integer index of where within the siblings to place the new section; 0 by default. To place the section at the end of its siblings, use the special value -1. |
|
sectionName |
string¦null |
The name of the new section, if different than the source section |
|
sectionParent |
string¦null |
The ID of the parent section to copy the section into. To place the section at the top level of the document, use the default null. |
Example#
{
"document": "327afa1a152f372fa1aeadb35ed28925d",
"sectionIndex": 2,
"sectionName": "October 2020",
"sectionParent": "327afa1a152f372fa1aeadb35ed28925d_1"
}