0

We're exploring using Envelope Connect to receive status updates for our envelopes we create through the DocuSign API. We'd like the messages to come to us in JSON format, but it seems that no matter what we provide, the messages arrive in XML format.

An example of an eventNotification we're including with our envelopes is below:

{
"envelopeEvents": [
    {
        "envelopeEventStatusCode": "Completed",
        "includeDocuments": false
    },
    {
        "envelopeEventStatusCode": "Declined",
        "includeDocuments": false
    },
    {
        "envelopeEventStatusCode": "Voided",
        "includeDocuments": false
    }
],
"eventData": {
    "format": "json",
    "includeData": [
        "custom_fields"
    ],
    "version": "restv2.1"
},
"loggingEnabled": true,
"recipientEvents": [
    {
        "includeDocuments": false,
        "recipientEventStatusCode": "Completed"
    }
],
"requireAcknowledgment": true,
"url": "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

The DocuSign Developer API Reference says to use the "events" property of the eventNotification object when using the JSON SIM event model, but when we use this instead of envelopeEvents or recipientEvents, we don't receive any status updates.

I followed the message format in this youtube video, which shows the message coming back as JSON, but when I do the same, we get XML. https://www.youtube.com/watch?v=bcTaBKf_c50

The Connect logs in the DocuSign Admin center confirm this: Connect log

Could there be some configuration in our account that is preventing the message format from being JSON?

We do have some account level Connect configurations, could these be interfering?

2 Answers2

0

Yes, you have to do this in the "Settings" page (DocuSign Admin) and go to the Connect section and configure account-wide connect configuration.

There, you can select which format you want used like this:

enter image description here

By selecting REST v2.1, you will get JSON instead of XML.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • 1
    We are attempting to use **Envelope Connect**, not an account-wide connect configuration. I've also tried removing all account-wide connect configurations from our account, and also having a single REST v2.1 connect configuration in our account; the data is still returned in XML format. – Johnathan Knutson Jan 27 '23 at 15:43
  • "version": "restv2.1" should do the trick, if it's not working, you will need to contact support, because I don't know what's wrong with your account – Inbar Gazit Jan 27 '23 at 17:21
0

DocuSign Support was able to identify the issue.

Our API calls were going through /v2/ of the REST API: https://demo.docusign.net/restapi/v2/

But JSON status updates are only sent with v2.1. https://demo.docusign.net/restapi/v2.1/