WernerCD
WernerCD

Reputation: 2157

DocuSignAPI - Sign an envelope via API

We are creating an application that processes signed documents. As part of the testing process, I'd like to automate the creation and signing of sample documents. How can I sign the documents via postman?

Using the Postman scripts located at the DocuSign/blog, I can authenticate:

https://{{hostenv}}/restapi/{{apiVersion}}/login_information?api_password=true
{
    "loginAccounts": [
        {
            "name": "Personal",
            "accountId": "9",
            "baseUrl": "https://demo.docusign.net/restapi/v2.1/accounts/9",
            "isDefault": "true",
            "userName": "Chris",
            "userId": "",
            "email": "",
            "siteDescription": ""
        }
    ],
    "apiPassword": "="
}

and then create an envelope to be signed...

{{baseUrl}}/envelopes

{
  "recipients": {
    "signers": [
      {
        "email": "{{signer1Email}}",
        "name": "{{signer1Name}}",
        "recipientId": 1,
        "tabs": {
          "signHereTabs": [
            {
              "xPosition": "100",
              "yPosition": "100",
              "documentId": "1",
              "pageNumber": "1"
            }
          ]
        }
      }
    ]
  },
  "emailSubject": "DocuSign API - Signature Request on Document Call",
  "documents": [
    {
      "documentId": "1",
      "name": "blank1.pdf",
      "documentBase64": "JVBERi0x..."
    }
  ],
  "status": "sent"
}

Is there a way - via postman - to sign the envelope that was just created?

I've been exploring a more involved setup (Selenium, etc) but was wondering if documents can be signed via postman.

Upvotes: 0

Views: 422

Answers (2)

Drew
Drew

Reputation: 5029

As Inbar states, you can't automatically sign an envelope using the DocuSign API. One alternative is to Correct the envelope to change the Signer to a Carbon Copy recipient, which would immediately complete their role in the envelope.

Upvotes: 1

Inbar Gazit
Inbar Gazit

Reputation: 14015

You cannot sign envelopes via the REST API (or any other API). You can use UI automation techniques to click things on the page and sign envelopes this way. there's a similar question that was asked here, it has an answer from an automation expert who did this - DocuSign integration tests

Upvotes: 0

Related Questions