Class: Document

Document

new Document ()

A Document instance created by Envelope#reflect
Properties:
Name Type Description
id string Document id
envelope_id string Envelope id
data object Raw document data from the latest reflection
template Template Template instance if typeof this documents source is "template"

Methods

getFile (fileId)string async

Returns information about the specified file
Name Type Description
fileId string The id of the file to get info about
Returns:
Type Description
string Download url

getFileDownloadUrl (fileId)string async

Returns a download url for the specified file
Name Type Description
fileId string The id of the file to get the download url for
Returns:
Type Description
string Download url

put (data) async

Makes a raw PUT request to the API on the document
Name Type Description
data object The payload to be sent

setTags (tags) async

Update the documents tags
Name Type Description
tags Array.<string> An array of tags

uploadAttachment (fileName, binary) async

Upload an attachment to the document
Name Type Description
fileName string The name of the attachment that will be shown in Verified
binary binary Binary data of the attachment file

uploadPDF (fileName, binary) async

Upload the main PDF of a document
Name Type Description
fileName string The name of the pdf that will be shown in Verified
binary binary Binary data of the pdf file