Skip to main content

Document

A Document represents a document that has been sent for signing. Every Document is created from a Template and sent to one or more Recipients. Documents belong to a Group and may be part of a Batch.

Implements: Node

Fields

FieldTypeDescription
idID!Unique identifier
nameStringTitle of the document
linkStringShort-lease URL for downloading the document
statusStringCurrent state (e.g. inprogress, completed, rejected)
hashStringHash value for verifying the document hasn't been tampered with
tagsStringComma-separated tags assigned to this document
createdAWSDateTimeWhen the document was created
modifiedAWSDateTimeWhen the document was last modified
senderNameStringName of the person who sent the document
senderEmailAWSEmailEmail of the sender
batchIdIDID of the batch this document belongs to (if any)
batchNameStringName of the batch
batchOrderIntPosition within the batch
taskIdIDID of the async task that created this document
certifyDocumentBooleanWhether the final document is certified
retentionFloatExpiry datetime in unix epoch seconds
sendMethodStringMethod/tool used to send this document
sourceTemplateIdIDID of the template this was created from (efficient for list queries)
sourceTemplateNameStringName of the source template

Relationships

FieldTypeDescription
groupGroupThe group this document belongs to
templateTemplateThe original template
recipients[Recipient]Participants who received this document
auditLog[AuditLogItem]Audit trail for this document
elementConnectionDocumentElementConnectionSender fields on this document

Query

query GetDocument($id: ID!) {
document(id: $id) {
id
name
status
created
}
}

Documents are also accessed via Group.documentConnection — see How Pagination Works.

documentConnection Arguments

When querying documents through a group:

ArgumentTypeDefaultDescription
firstIntNumber of items to return
afterIDCursor for forward pagination
fromAWSDateTimeFilter by start date
toAWSDateTimeFilter by end date
searchStringnullSearch by document name
statusStringnullFilter by status
sendTypeSendTypeALLFilter by SINGLE, BATCHED, or ALL
sender[ID]nullFilter by sender user IDs

Example

A typical document detail query (based on the Legalesign Console app):

query GetDocumentDetails {
document(id: "ZG9jMWVmMjdkYWYtMGJlMS0xMWYwLWJiYjUtMDZlNDc2YTA3NTY5") {
id
name
status
batchId
batchName
created
modified
senderName
senderEmail
certifyDocument
hash
retention
group {
id
name
publicName
}
template {
id
title
}
recipients {
id
firstName
lastName
email
status
roleType
role
signedDateTime
sentDateTime
emailProblem
recipientOrder
}
auditLog {
created
description
name
email
status
code
ip
}
}
}

Export This Article

Save a copy of this page as PDF or plain text.