API Reference

Data-Driven Automation

In Smarter Drafter Pro, customers can automate the creation of documents by leveraging our Data-Driven automation submission endpoints. Answers to questions can be sent via HTTP request and seemly integrate with other systems. This is a powerful tool to automate a big set of document creation and, more importantly, it supports workflow automation such as Microsoft Power Automate and similar tools.

Steps to implement Data-Driven Automation (DDA):

  1. Ensure you've created an API Key, see Authentication

  2. Set up a form in the Smarter Drafter Pro builder page with questions you'd like to capture. Add a template if you want to generate a document. At this stage, take note of the Form ID, which can be found in the URL, and also the Field ID. When building this automation, the endpoint fields by form ID can be used to list all form fields and their properties, such as ref, label, or whether the question is required.

  3. Smarter Drafter Pro allows customers to create submissions in two ways: Send all answers to the required question and submit, or send only a subset or no answers at all, which would create a Draft submission.

  4. Sending all answers at once and submitting:

    1. The create submission endpoint can be used where the request's body must contain all required answers of the form, and the isDraft field must be left empty. See sample request:
 {
    "name": "DDA - First Submission",
    "formId": 3246226,
    "userEmailAddress": "customer@company.com",
    "answers": [
        {
            "ref": "100907558",
            "answer": "My required answer"
        }
    ]
}
  1. Create a draft submission where answers can be provided at any point in time while the submission is still in the draft state:
    1. The create submission endpoint can be used where the request's body must contain the property isDraft set to true and no answers are required, but can be provided. Take note of the submission ID in the response. See sample request:
 {
    "name": "DDA - First Draft Submission",
    "formId": 3246226,
    "userEmailAddress": "customer@company.com",
    "isDraft": true
}
  1. Use the Update Answer endpoint to update the answer. All format and requirement validation is also done in the endpoint:
curl --request PUT \
     --url https://server/v1/clients/Submissions/{{submission_ID}}/UpdateAnswer/100907558 \
     --header 'X-SmarterDrafter-Key: XXXX' \
     --header 'accept: application/json' \
     --header 'content-type: multipart/form-data' \
     --form Answer=My first answer
  1. Once all required answers are provided, a final request must be made using the Submit Submission endpoint, which will update the status of the submission to submit and will queue necessary documents for generation. At this point, it's also possible to provide the matter number and/or the integration destination. Once documents have been generated, any integration configured will be fired, e.g., webhooks, NetDocuments, etc.