docusign / docusign-esign-node-client

The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
http://docusign.github.io/docusign-esign-node-client
MIT License
144 stars 99 forks source link

400 UNSPECIFIED_ERROR Object reference not set to an instance of an object. #331

Open Arlen22 opened 1 year ago

Arlen22 commented 1 year ago

options

{
  "method": "POST",
  "url":"https://demo.docusign.net/restapi/v2.1/accounts/redacted_uuid/envelopes",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer ey_redacted_3A"
  }
}

body

{
  "documents": [
    {
      "documentBase64": "<base64>",
      "name": "Signing document",
      "fileExtension": "pdf",
      "documentId": "1",
      "tabs": {
        "signHereTabs": [
          {
            "documentId": "1",
            "height": "0",
            "isSealSignTab": "false",
            "name": "SignHere",
            "optional": "false",
            "recipientId": "1",
            "scaleValue": "1",
            "stampType": "signature",
            "tabId": "692c2455-da28-4305-a9f1-d3d94ca6b582",
            "tabLabel": "Signature 4d50315c-268e-4e1e-af4e-fdd3b9f10833",
            "tabType": "signhere",
            "templateLocked": "false",
            "templateRequired": "false",
            "tooltip": "SignHere",
            "width": "0",
            "xPosition": "42",
            "yPosition": "347"
          }
        ]
      }
    }
  ],
  "emailSubject": "Please sign this document set",
  "recipients": {
    "signers": [
      {
        "email": "redacted@gmail.com",
        "name": "Arlen Redacted",
        "recipientId": "1",
        "routingOrder": "1"
      }
    ]
  },
  "status": "sent"
}
Adrian-DS-Support commented 1 year ago

Hi Arien22,

Please move your "tabs" list to your Signers object. Like this:

"signers": [
            {
                "email": "adrianc@gmail.com",
                "name": "Arlen Redacted",
                "recipientId": "1",
                "routingOrder": "1",
                "tabs": {
                    "signHereTabs": [
                        {
                            "documentId": "1",
                            "height": "0",
                            "isSealSignTab": "false",
                            "name": "SignHere",
                            "optional": "false",
                            "recipientId": "1",
                            "scaleValue": "1",
                            "stampType": "signature",
                            "tabId": "692c2455-da28-4305-a9f1-d3d94ca6b582",
                            "tabLabel": "Signature 4d50315c-268e-4e1e-af4e-fdd3b9f10833",
                            "tabType": "signhere",
                            "templateLocked": "false",
                            "templateRequired": "false",
                            "tooltip": "SignHere",
                            "width": "0",
                            "xPosition": "42",
                            "yPosition": "347",
                            "pagenumber": "1"
                        }
                    ]
                }
            }
        ]

Adrian DocuSign Developer Support

Arlen22 commented 1 year ago

The website docs seem to indicate that I can include it in either location. In my case, I can move it and it works fine then, but it seems like the docs should be updated at the very least or else this is a bug that needs to be fixed.