以下は、DocuSign WebService を使用して複数の関係者が署名するドキュメントを送信するコードを書いています。サイトから WebService(.asmx) URL を取得し、これService Reference
をプロジェクトに追加する手順を説明します。
ここからエンベロープまたはタブとは何かの詳細を取得できます
Envelope envelope = new Envelope();
envelope.Subject = subject;
envelope.EmailBlurb = "This is Awesome. Kung fu Panda is just awesome";
envelope.AccountId = ConfigurationManager.AppSettings["APIAccountId"];
Recipient recipient = new Recipient();
recipient.UserName = name;
recipient.Email = txtRecipientEmail.Text;
recipient.ID = "1";
recipient.Type = RecipientTypeCode.Signer;
//here you can add multiple recipients
envelope.Recipients = new Recipient[] { recipient };
Document document = new Document();
document.PDFBytes = FileHelper.StreamToByteArray(fileUploadTool1.FileContent );
document.FileExtension = Path.GetExtension(fileUploadTool1.PostedFile.FileName);
document.Name = Path.GetFileName(fileUploadTool1.PostedFile.FileName);
document.ID = "1";
envelope.Documents = new Document[] { document };
Tab tab1 = new Tab();
tab1.RecipientID = "1";
tab1.PageNumber = "1";
tab1.DocumentID = "1";
tab1.Type = TabTypeCode.SignHere;
tab1.XPosition = "50";
tab1.YPosition = "200";
Tab tab2 = new Tab();
tab2.RecipientID = "1";
tab2.PageNumber = "1";
tab2.DocumentID = "1";
tab2.Type = TabTypeCode.DateSigned;
tab2.XPosition = "110";
tab2.YPosition = "225";
envelope.Tabs = new Tab[] { tab1, tab2 };
APIServiceSoapClient proxy = Get_Proxy();
EnvelopeStatus status = proxy.CreateAndSendEnvelope(envelope);
StatusLabel.Text = "The envelope is " + status.Status.ToString() + ".";