-->

重新发送电子邮件的DocuSign重新发送电子邮件的DocuSign(Resend DocuSign

2019-05-12 08:07发布

是否有一个API端点,让我重新触发电子邮件到收件人? 有时候用户可能得不到或者失去的,其包含了签约环节的DocuSign电子邮件。 我希望能够重新发送这些电子邮件的需求。

Answer 1:

您可以使用“修改收件人”请求触发电子邮件通知的重新发送。

PUT /accounts/{accountId}/envelopes/{envelopeId}/recipients?resend_envelope=true

一定要包括查询字符串参数/值resend_envelope =在URL (如上所示)。

例如,如果一个GET响应收件人显示了信封包含下列收件人:

{
    "signers": [
        {
            "name": "Jane Doe",
            "email": "janesemail@outlook.com",
            "recipientId": "3",
            "recipientIdGuid": "13e30b8d-3dd6-48e8-ad12-15237611a463",
            "requireIdLookup": "false",
            "userId": "2c9e06eb-f2c5-4bef-957a-5a3dbd6edd25",
            "routingOrder": "1",
            "status": "sent"
        },
        {
            "name": "John Doe",
            "email": "johnsemail@outlook.com",
            "recipientId": "1",
            "recipientIdGuid": "c2273f0f-1430-484a-886c-45ce2fb5e8a8",
            "requireIdLookup": "false",
            "userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
            "routingOrder": "1",
            "note": "",
            "roleName": "Signer1",
            "status": "sent",
            "templateLocked": "false",
            "templateRequired": "false"
        }
    ],
    "agents": [],
    "editors": [],
    "intermediaries": [],
    "carbonCopies": [],
    "certifiedDeliveries": [],
    "inPersonSigners": [],
    "recipientCount": "2",
    "currentRoutingOrder": "1"
}

然后,我可以使用下面的请求触发签约邀请电子邮件的重新发送给收件人不完整(“李四”):

PUT https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?resend_envelope=true

{
  "signers": [
   {
      "recipientId": "3",
      "name": "Jane Doe",
      "email": "janesemail@outlook.com"
    }
  ]
}

请注意,我要送一样的(原)值姓名电子邮件 -所以它不会实际修改收件人-它只会重新发送电子邮件至简,因为我包含在resend_envelope =真的吗? URL。

API文档



Answer 2:

我不知道,如果一个单独的API调用存在只是为了重新发送信封(通知),但你也许可以通过修改或更正并重新发送收件人信息 API调用来摆脱它。

这个调用通常用来纠正你的recipients-的信息。例如,如果使用不正确的电子邮件地址创建信封或也许有错名字的人,你可以使用这个调用来修改的电子邮件地址,然后重新发送信封。 而当你拨打电话有一个名为可选查询参数

?resend_envelope={true or false}

尝试使这个电话,但不是改变任何收件人信息,简单的追加URL参数以及可能重新发送信封。

文档



Answer 3:

你可以使用NuGet包管理器“DocuSign.eSign.Api”使用的DocuSign的最新API。

我没有使用C#它:

//第一个受助准备:

    Recipients recpnts = new Recipients
                {
                    //CurrentRoutingOrder = "1", // Optional.
                    Signers = new List<Signer>()
                {
                        new Signer
                        {
                            RecipientId = "1",
                            RoleName = "Prospect",
                            Email = "ert@gmail.com",
                            Name = "Shyam",
                        },
                    }
                };
// Call Envelopes API class which has UpdateRecepient Method

EnvelopesApi epi = new EnvelopesApi();

var envelopeId ="62501f05-4669-4452-ba14-c837a7696e04";

var accountId = GetAccountId();

// The following Line is responsible for Resend Envelopes.

 RecipientsUpdateSummary recSummary = epi.UpdateRecipients(accountId, envelopeId , recpnts);

// Get Status or Error Details.

var summary = recSummary.RecipientUpdateResults.ToList();

var errors = summary.Select(rs => rs.ErrorDetails).ToList();

// Method to get your Docusign Account Details and Authorize it.

private static string GetAccountId()
        {
            string username = "Account Email Address";
            string password = "Account Password;
            string integratorKey = "Your Account Integrator Key";

      // your account Integrator Key (found on Preferences -> API page)                                                                


            ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
            Configuration.Default.ApiClient = apiClient;

            // configure 'X-DocuSign-Authentication' header
            string authHeader = "{\"Username\":\"" + username + "\", \"Password\":\"" + password + "\", \"IntegratorKey\":\"" + integratorKey + "\"}";
            Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);

            // we will retrieve this from the login API call
            string accountId = null;

            /////////////////////////////////////////////////////////////////
            // STEP 1: LOGIN API        
            /////////////////////////////////////////////////////////////////

            // login call is available in the authentication api 
            AuthenticationApi authApi = new AuthenticationApi();
            LoginInformation loginInfo = authApi.Login();

            accountId = loginInfo.LoginAccounts[0].AccountId;
            return accountId;
        }


Answer 4:

这是SOAP不改变收件人信息:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.docusign.net/API/3.0">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>[integratorKey]UserName</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns:CorrectAndResendEnvelope>
        <ns:Correction>
            <ns:EnvelopeID>1234</ns:EnvelopeID>
            <ns:RecipientCorrections>
               <ns:RecipientCorrection>
                  <ns:PreviousUserName>userName</ns:PreviousUserName>
                  <ns:PreviousEmail>user@email.com</ns:PreviousEmail>
                  <ns:PreviousRoutingOrder>1</ns:PreviousRoutingOrder>                  
                  <ns:Resend>true</ns:Resend>
               </ns:RecipientCorrection>
            </ns:RecipientCorrections>
        </ns:Correction>
      </ns:CorrectAndResendEnvelope>
   </soapenv:Body>
</soapenv:Envelope>


文章来源: Resend DocuSign Emails
标签: docusignapi