Forms
Forms let you send customer-facing questionnaires to recipients and track their completion. This guide covers sending forms, monitoring their status, and managing form lifecycles.
List available forms
Use the listForms query to see all forms configured for your team:
query ListForms {
listForms {
id
title
description
}
}Send a form
Use the sendForm mutation to send a form to a recipient:
mutation SendForm {
sendForm(
where: {
companyId: "<company_id>"
formId: "<form_id>"
recipientEmail: "<email_address>"
recipientName: "<name>"
}
) {
success
formInstanceId
}
}You need to provide the Strise entity ID of the company and
the form ID from listForms.
Obtain the company ID
Use companyIdentifierSearch to find a company by its national identifier. If no matching company exists, create one using the customCompanyCreate mutation.
Monitor form status
The formInstanceId returned from sendForm can be used to
check the form's status with the
document query:
query GetFormStatus {
document(
where: {
documentId: "<form_instance_id>"
companyId: "<company_id>"
}
) {
id
fileName
status
downloadUrl
lastModifiedAt
}
}The status field indicates where the form is in its
lifecycle:
| Status | Description |
|---|---|
PENDING | Form has been sent but not yet started |
IN_PROGRESS | Recipient has started filling out the form |
SUCCESS | Form has been completed and is ready for download |
FAILED | Form processing failed |
CANCELLED | Form was cancelled before completion |
Once status is SUCCESS, you can download the completed
form using the downloadUrl.
List all company documents
A form submission may include multiple documents. Use Company.documents to see all documents related to a company:
query GetCompanyDocuments {
company(where: { id: "<company_id>" }) {
documents {
id
fileName
status
downloadUrl
source
lastModifiedAt
}
}
}Create a shareable form URL
Use the createFormUrl mutation to generate a shareable link for an active form. This is useful when you need to resend a form link to a customer:
mutation CreateFormUrl {
createFormUrl(
where: {
companyId: "<company_id>"
documentId: "<form_instance_id>"
}
) {
url
}
}Cancel a form
Use the cancelForm mutation
to cancel an active form that is in progress. The associated
document's status is set to CANCELLED:
mutation CancelForm {
cancelForm(
where: {
companyId: "<company_id>"
documentId: "<form_instance_id>"
}
) {
success
}
}Attach an external form instance
If a form was initiated outside of the API, use the attachFormInstance mutation to link it to a company:
mutation AttachFormInstance {
attachFormInstance(
where: {
companyId: "<company_id>"
formInstanceId: "<form_instance_id>"
}
) {
success
}
}