Skip to main content

Query Examples

These examples show basic queries for each top-level query in the API. For full argument details and return types, see the individual query reference pages and type reference pages.

Organisation Query

See: organisation query · Organisation type

query GetOrganisation($id: ID!) {
organisation(id: $id) {
id
name
retention
pdfRetention
attachmentRetention
textRetention
created
userCount
}
}

Template Query

See: template query · Template type

query GetTemplate($id: ID!) {
template(id: $id) {
id
title
pageCount
fileName
link
autoArchive
valid
locked
tags
groupId
archived
createdBy
lastSent
created
modified
}
}

Experience Query

See: experience query · Experience type

query GetExperience($id: ID!) {
experience(id: $id) {
id
name
header
text1
text2
text3
allowSignatureReuse
attachDraft
backgroundColour
defaultExperience
language
created
modified
}
}

Document Query

See: document query · Document type

query GetDocument($id: ID!) {
document(id: $id) {
id
name
link
status
hash
created
modified
senderName
senderEmail
batchId
batchName
taskId
certifyDocument
sendMethod
}
}

Batch Query

See: batch query · Batch type

query GetBatch($id: ID!) {
batch(id: $id) {
id
name
enforceOrder
type
creatorName
documentCount
inProgressCount
rejectedCount
completedCount
bouncedCount
created
modified
status
progress
}
}

Group Query

See: group query · Group type

query GetGroup($id: ID!) {
group(id: $id) {
id
name
publicName
attachmentRetention
pdfRetention
retention
textRetention
apiIntegration
certifyDocuments
sequentialSend
stopPDFPrinting
stopPDFCopying
licensesRemaining
credit
}
}

Contact Group Query

See: contactGroup query · ContactGroup type

query GetContactGroup($id: ID!) {
contactGroup(id: $id) {
id
name
colour
contacts {
id
name
firstName
lastName
email
timeZone
phoneNumber
}
}
}

User Query

See: user query · User type

query GetUser($id: ID) {
user(id: $id) {
id
name
firstName
lastName
email
timeZone
companySize
companyRole
companyType
lastDocumentSentAt
lastValidTemplateMadeAt
uploadedTemplatesCount
webhookHmacSecret
}
}

Task Query

See: task query

query GetTask($id: ID!) {
task(id: $id) {
data
report {
status
batchId
documents
errors
}
}
}

Draft Query

See: draft query · Draft type

query GetDraft($id: ID!) {
draft(id: $id) {
id
name
shared
templateCount
batch
multidoc
version
created
modified
link
}
}

Recipient Query

See: recipient query · Recipient type

query GetRecipient($id: ID!) {
recipient(id: $id) {
id
phoneNumber
firstName
lastName
email
role
roleType
status
authentication
timeZone
experience
expiryDate
skipped
nominate
detailsTBD
emailOpenedDateTime
documentFirstViewedDateTime
signedDateTime
sentDateTime
emailProblem
recipientOrder
}
}

Invoice Query

See: invoice query · Invoice type

query GetInvoice($id: ID!) {
invoice(id: $id) {
id
created
supplyDate
currency
paymentSystem
invoiceNumber
taxRate
subTotal
totalIncTax
creditReason
customerName
address1
postcode
link
}
}

Node Query

See: node query

query GetNode($id: ID!) {
node(id: $id) {
id
}
}

Upload Query

See: upload query · Upload Files how-to

query GetUpload($id: ID!, $uploadType: UploadType!, $extension: String!) {
upload(id: $id, uploadType: $uploadType, extension: $extension) {
url
}
}