API Reference

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

Properties

NameTypeDescriptionRestrictions
createdActionWhen the action was performed, and details about the user who did itread-only
idstringThe unique identifier of the documentread-only
modifiedActionWhen the action was performed, and details about the user who did itread-only
namestringName of the documentread-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
templatebooleanWhether the document is a templateread-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

Properties

NameTypeDescriptionRestrictions
docxOptionsDocumentToDocxOptions¦nullOptional options to export the document as a Microsoft Word document (.DOCX). If no options are provided, all options default to False.
formatstringThe file format to export the document as.
pdfOptionsDocumentToPdfOptions¦nullOptional 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.

Enumerated Values

PropertyValue
formatpdf
formatdocx

Example

{
  "docxOptions": {
    "includeLeaderDots": true,
    "showTableCellShading": true
  },
  "format": "docx",
  "sections": [
    "a8b3adb687644b27fafcb3a9875f0f0d_18",
    "a8b3adb687644b27fafcb3a9875f0f0d_19"
  ]
}

DocumentToDocxOptions

Properties

NameTypeDescriptionRestrictions
includeLeaderDotsbooleanWhether to include leader dots when exporting to .DOCX. False by default.
showTableCellShadingbooleanWhether to show table cell shading when exporting to .DOCX. False by default.

Example

{
  "includeLeaderDots": true,
  "showTableCellShading": true
}

DocumentToPdfOptions

Properties

NameTypeDescriptionRestrictions
includeAlternateRowFillbooleanWhether to include alternate row fill when exporting to .PDF. False by default.
includeAttachmentLabelsbooleanWhether to include attachment labels when exporting to .PDF. False by default.
includeCommentsbooleanWhether to include comments when exporting to .PDF. False by default. When True, all comments are included, even those already resolved.
includeDraftWatermarkbooleanWhether to include a "Draft" watermark when exporting to .PDF. False by default.
includeHyperlinksbooleanWhether to include hyperlinks when exporting to .PDF. False by default.
includeLeaderDotsbooleanWhether to include leader dots when exporting to .PDF. False by default.
includeTrackChangesbooleanWhether to include track changes when exporting to .PDF. False by default.
tagForWebAccessibilitybooleanWhether to tag for web accessibility when exporting to .PDF. False by default.
useCmykColorspacebooleanWhether 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,
  "tagForWebAccessibility": true,
  "useCmykColorspace": true
}

Section

Properties

NameTypeDescriptionRestrictions
children[Section]An array of partial information about any sections within the sectionread-only
idstringThe unique identifier of the sectionread-only
indexintegerThe 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.
namestringThe name of the section
nonPrintingbooleanWhether or not the section is non-printing
parentSection¦nullThe section's ID and name

Example

{
  "children": [],
  "id": "a8b3adb687644b27fafcb3a9875f0f0d_18",
  "index": 1,
  "name": "Risk factors",
  "nonPrinting": false,
  "parent": null
}

SectionCopy

Properties

NameTypeDescriptionRestrictions
documentstringThe unique identifier of the document to copy a section into
sectionIndexintegerThe 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.
sectionNamestring¦nullThe name of the new section, if different than the source section
sectionParentstring¦nullThe 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"
}