restemaildocusignapicarbon-copy

DocuSign REST API: Adding a Carbon Copy Recipient With Document Visibility


I can successfully add recipients to an existing DocuSign envelopes using REST API. When I add a signer to the envelope I am also able to specify the Document Visibility using excludedDocuments element. However I cannot set the document visibility using this parameter for the carbon copy recipient. My business requirement is that one carbon copy recipient should not receive some of the documents in the envelope.

Below is my JSON request:

{
  "carbonCopies": [
    {
      "email": "123@hotmail.com",
      "excludedDocuments": [
        "1"
      ],
      "name": "testCC1",
      "recipientId": "5"
    }
  ],
  "signers": [
    {
      "email": "123@gmail.com",
      "excludedDocuments": [
        "1"
      ],
      "name": "ssgmail signer",
      "recipientId": "7"
    }
  ]
}

Both the above recipients are added successfully. The first recipient(signer) is setup properly without visibility to document 1. The second recipient(carbon copy) is set up with full visibility.

Interestingly I can go to DocuSign interface and correct the envelope to remove the visibility for the carbon copy recipient. So I think DocuSign does support this functionality.

Any idea how I can add/change the visibility of individual documents for the carbon copy recipient for an existing envelope using the rest / soap API?

Note:-

  1. Frankly I do not know how to query the document visibility in an envelope/recipient using API. For this I go to the "View/Modify Document Visibility" link in the correct envelop screen to check the current visibility setting.

  2. I have set the the Document Visibility to "Must Sign to View Unless Sender Account" to enable the Document Visibility feature.


Solution

  • You are missing one property in the JSON Request, "enforceSignerVisibility":true, I have below request which is working fine with DocumentVisibility:

    {
      "documents": [
        {
          "documentBase64": "<Base64>",
          "documentId": "1",
          "fileExtension": "docx",
          "name": "Challenge3"
        },
        {
          "documentBase64": "<Base64>",
          "documentId": "2",
          "fileExtension": "docx",
          "name": "Challenge4"
        }
      ],
      "emailSubject": "Test Subject",
      "recipients": {
        "signers": [
          {
            "email": "Signer@gmail.com",
            "name": "Signer",
            "recipientId": "2",
            "routingOrder":1,
            "excludedDocuments":[2],
            "tabs": {
              "signHereTabs": [
                {
                  "documentId": "1",
                  "recipientId": "1",
                  "xPosition": "300",
                  "yPosition": "300",
                  "pageNumber":1
                }
              ]
            }
          }
        ],
        "carbonCopies": [
          {
            "email": "CC@gmail.com",
            "name": "CC",
            "recipientId": "1",
            "routingOrder":1,
            "excludedDocuments":[1]
          }
        ]
      },
      "status": "sent",
      "enforceSignerVisibility":true
    }