Search code examples
docusignapidocusignconnect

Docusign envelope recepient event notification


I am trying to sync DocuSign info and I want to track some envelope statuses and some recipient statuses.

I am using such data for draft envelope:

{
"emailSubject": "test 1",
"emailBlurb": null,
"recipients": null,
"documents": [
    {
        "documentId": 1,
        "name": "DocuSign_current_sync.pdf",
        "documentBase64": ".....",
        "fileExtension": "pdf"
    }
],
"status": "created",
"eventNotification": {
    "url": "https://webhook.site/{id}",
    "requireAcknowledgment": true,
    "includeDocuments": false,
    "includeEnvelopeVoidReason": true,
    "includeSenderAccountAsCustomField": false,
    "loggingEnabled": true,
    "envelopeEvents": [
        {
            "envelopeEventStatusCode": "sent",
            "includeDocuments": false
        },
        {
            "envelopeEventStatusCode": "delivered",
            "includeDocuments": false
        },
        {
            "envelopeEventStatusCode": "declined",
            "includeDocuments": false
        },
        {
            "envelopeEventStatusCode": "voided",
            "includeDocuments": false
        },
        {
            "envelopeEventStatusCode": "completed",
            "includeDocuments": false
        }
    ],
    "recipientEvents": [          
        {
            "recipientEventStatusCode ": "signed",
            "includeDocuments": false
        },
        {
            "recipientEventStatusCode ": "completed",
            "includeDocuments": false
        }
    ],
    "eventData": {
        "format": "json",
        "version": "restv2.1",
        "includeData": [
            "recipients"
        ]
    }
}}

I am expecting to receive notification envelope status changes and notification each time when the recipient has signed/completed his process

But I am receiving only envelope level notifications and do not get any updates in a case when the recipient change his status

Any thoughts on what is wrong and how I can fix that?


Solution

  • Going to guess the issue is the extra space. I would expect an error message for an invalid recipient. Going to check into this.

    "recipientEventStatusCode ": "signed",
    

    Should be:

    "recipientEventStatusCode": "signed",