Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. PUT /accounts/{accountId}/envelopes/{envelopeId}/recipients?resend_envelope=true
  2.  
  3. {
  4. "signers": [
  5. {
  6. "name": "Jane Doe",
  7. "email": "janesemail@outlook.com",
  8. "recipientId": "3",
  9. "recipientIdGuid": "13e30b8d-3dd6-48e8-ad12-15237611a463",
  10. "requireIdLookup": "false",
  11. "userId": "2c9e06eb-f2c5-4bef-957a-5a3dbd6edd25",
  12. "routingOrder": "1",
  13. "status": "sent"
  14. },
  15. {
  16. "name": "John Doe",
  17. "email": "johnsemail@outlook.com",
  18. "recipientId": "1",
  19. "recipientIdGuid": "c2273f0f-1430-484a-886c-45ce2fb5e8a8",
  20. "requireIdLookup": "false",
  21. "userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
  22. "routingOrder": "1",
  23. "note": "",
  24. "roleName": "Signer1",
  25. "status": "sent",
  26. "templateLocked": "false",
  27. "templateRequired": "false"
  28. }
  29. ],
  30. "agents": [],
  31. "editors": [],
  32. "intermediaries": [],
  33. "carbonCopies": [],
  34. "certifiedDeliveries": [],
  35. "inPersonSigners": [],
  36. "recipientCount": "2",
  37. "currentRoutingOrder": "1"
  38. }
  39.  
  40. PUT https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?resend_envelope=true
  41.  
  42. {
  43. "signers": [
  44. {
  45. "recipientId": "3",
  46. "name": "Jane Doe",
  47. "email": "janesemail@outlook.com"
  48. }
  49. ]
  50. }
  51.  
  52. ?resend_envelope={true or false}
  53.  
  54. http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST API References/Modify or Correct and Resend Recipient Information.htm
  55.  
  56. You can use docusign's latest API using nuget package manager "DocuSign.eSign.Api".
  57.  
  58. Since , I am using C#, so here is the code:
  59. //Very first prepare Recepients:
  60.  
  61. Recipients recpnts = new Recipients
  62. {
  63. //CurrentRoutingOrder = "1", // Optional.
  64. Signers = new List<Signer>()
  65. {
  66. new Signer
  67. {
  68. RecipientId = "1",
  69. RoleName = "Prospect",
  70. Email = "ert@gmail.com",
  71. Name = "Shyam",
  72. },
  73. }
  74. };
  75. // Call Envelopes API class which has UpdateRecepient Method
  76.  
  77. EnvelopesApi epi = new EnvelopesApi();
  78.  
  79. var envelopeId ="62501f05-4669-4452-ba14-c837a7696e04";
  80.  
  81. var accountId = GetAccountId();
  82.  
  83. // Get Status or Error Details.
  84.  
  85. var summary = recSummary.RecipientUpdateResults.ToList();
  86.  
  87. var errors = summary.Select(rs => rs.ErrorDetails).ToList();
  88.  
  89. // Method to get your Docusign Account Details and Authorize it.
  90.  
  91. private static string GetAccountId()
  92. {
  93. string username = "Account Email Address";
  94. string password = "Account Password;
  95. string integratorKey = "Your Account Integrator Key";
  96.  
  97. // your account Integrator Key (found on Preferences -> API page)
  98.  
  99.  
  100. ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
  101. Configuration.Default.ApiClient = apiClient;
  102.  
  103. // configure 'X-DocuSign-Authentication' header
  104. string authHeader = "{"Username":"" + username + "", "Password":"" + password + "", "IntegratorKey":"" + integratorKey + ""}";
  105. Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);
  106.  
  107. // we will retrieve this from the login API call
  108. string accountId = null;
  109.  
  110. /////////////////////////////////////////////////////////////////
  111. // STEP 1: LOGIN API
  112. /////////////////////////////////////////////////////////////////
  113.  
  114. // login call is available in the authentication api
  115. AuthenticationApi authApi = new AuthenticationApi();
  116. LoginInformation loginInfo = authApi.Login();
  117.  
  118. accountId = loginInfo.LoginAccounts[0].AccountId;
  119. return accountId;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement