重新发送DocuSign电子邮件

时间:2014-02-04 23:31:38

标签: docusignapi

是否有API端点允许我重新触发收件人的电子邮件?有时,用户可能无法获取或丢失包含其签名链接的DocuSign电子邮件。我希望能够按需发送这些电子邮件。

5 个答案:

答案 0 :(得分:11)

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

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

请务必在网址中包含查询字符串参数/值 resend_envelope = true 。(如上所示)。

例如,如果 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"
}

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

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"
    }
  ]
}

请注意,我发送名称电子邮件的相同(原始)值 - 因此它不会实际修改收件人 - 它只是将电子邮件重新发送给Jane,因为我在网址中包含?resend_envelope = true

API Documentation

答案 1 :(得分:1)

我不确定是否存在单独的api调用只是为了重新发送信封(通知),但是您可以通过使用修改或更正并重新发送收件人信息来逃避它api电话。

该通话通常用于更正有关您的收件人的信息 - 例如,如果您创建了一个包含错误电子邮件地址的信封,或者某个人的姓名错误,您可以使用此通话修改电子邮件地址并重新发送信封。当您拨打电话时,会有一个名为

的可选查询参数
?resend_envelope={true or false}

尝试拨打此电话,但不是更改任何收件人信息,只需添加网址参数即可重新发送信封。

Documentation

答案 2 :(得分:0)

您可以使用nuget包管理器“DocuSign.eSign.Api”使用docusign的最新API。

我是用C#做的:

//首先准备Recepients:

    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;
        }

答案 3 :(得分:0)

这是针对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>

答案 4 :(得分:0)

要在用户界面中复制“重新发送”按钮的行为

  

选择订单中的下一位,并向他们发送一封电子邮件

您可以使用API Explorer来填写帐户ID,信封ID和Oauth令牌,然后将resend-envelope设置为true

像这样的卷发:

curl --request PUT \
  --url 'https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}?resend_envelope=true' \
  --header 'accept: application/json' \
  --header 'accept-encoding: gzip,deflate,sdch' \
  --header 'accept-language: en-US,en;q=0.8,fa;q=0.6,sv;q=0.4' \
  --header 'authorization: {bearerToken}' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{}'

请注意:这是必需的,否则您将需要400个

{}
相关问题