DocuSign活动通知

时间:2014-07-01 06:32:00

标签: asp.net-mvc docusignapi asp.net-web-api2

我正在将DocuSign API集成到我们的应用程序中。我被困在一个地方,我必须发送一个公共URI作为'EventNotification'以及信封。我的公共URI只不过是一个asp.net web API。我很困惑DocuSign将如何向我发送以下信息: - EnvelopeId - DocumentId(签名或拒绝) - 已完成或已拒绝 - Singee信息(姓名和电子邮件ID)

假设我的API看起来像这样:

[ActionName("DocuSignDocumentStatus")]

[HttpPost]

public void DocuSignDocumentStatus()
{

}

我的行动将在此处获取或发布? 我的动作签名会包含哪些参数?

public void DocuSignDocumentStatus(string envelopeId?和/或string documentId和/或string Completed / Declined和/或....)

请帮忙。

1 个答案:

答案 0 :(得分:3)

信封上的DocuSign eventNotification功能就像DocuSign Connect模块一样,除了它是基于每个信封而不是Connect工作的帐户级别。< / p>

eventNotification和DocuSign Connect都会将实时XML格式的消息发送到您设置为接受此类请求的可公开访问的http侦听器。它始终是一个发送的http POST,您需要在您的末尾编写逻辑来解析进来的消息。

例如,这可能是XML的样子以及解析所需的内容:

<?xml version="1.0" encoding="UTF-8"?>
<DocuSignEnvelopeInformation xmlns="http://www.docusign.net/API/3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <EnvelopeStatus>
      <RecipientStatuses>
         <RecipientStatus>
            <Type>Signer</Type>
            <Email>user.email@address.com</Email>
            <UserName>User Name</UserName>
            <RoutingOrder>1</RoutingOrder>
            <Sent>2010-06-26T09:19:18.883</Sent>
            <Delivered>2010-06-26T09:19:40.723</Delivered>
            <DeclineReason xsi:nil="true" />
            <Status>Delivered</Status>
            <RecipientIPAddress>::1</RecipientIPAddress>
            <CustomFields />
            <TabStatuses>
               <TabStatus>
                  <TabType>Custom</TabType>
                  <Status>Active</Status>
                  <XPosition>364</XPosition>
                  <YPosition>52</YPosition>
                  <TabLabel>Radio</TabLabel>
                  <TabName>Two</TabName>
                  <TabValue />
                  <DocumentID>1</DocumentID>
                  <PageNumber>2</PageNumber>
                  <OriginalValue />
                  <ValidationPattern />
                  <RoleName>TestRole</RoleName>
               </TabStatus>
            </TabStatuses>
            <AccountStatus>Active</AccountStatus>
            <RecipientId>fb89d2ee-2876-4290-b530-ff1833d5d0d2</RecipientId>
         </RecipientStatus>
      </RecipientStatuses>
      <TimeGenerated>2010-06-26T09:19:45.771206-07:00</TimeGenerated>
      <EnvelopeID>0aa561b8-b4d9-47e0-a615-2367971f876b</EnvelopeID>
      <Subject>CreateEnvelopeFromTemplates Test</Subject>
      <UserName>User Name</UserName>
      <Email>user.email@address.com</Email>
      <Status>Delivered</Status>
      <Created>2010-06-26T09:16:21.27</Created>
      <Sent>2010-06-26T09:19:19.01</Sent>
      <Delivered>2010-06-26T09:19:40.747</Delivered>
      <ACStatus>Original</ACStatus>
      <ACStatusDate>2010-06-26T09:16:21.27</ACStatusDate>
      <ACHolder>ACHolder Name</ACHolder>
      <ACHolderEmail>ACHolder.email@address.com</ACHolderEmail>
      <ACHolderLocation>ACHolder Location</ACHolderLocation>
      <SigningLocation>Online</SigningLocation>
      <SenderIPAddress>::1</SenderIPAddress>
      <EnvelopePDFHash />
      <CustomFields>
         <CustomField>
            <Name>Envelope Field 1</Name>
            <Show>False</Show>
            <Required>False</Required>
            <Value />
         </CustomField>
         <CustomField>
            <Name>Envelope Field 2</Name>
            <Show>False</Show>
            <Required>False</Required>
            <Value />
         </CustomField>
      </CustomFields>
      <AutoNavigation>true</AutoNavigation>
      <EnvelopeIdStamping>true</EnvelopeIdStamping>
      <AuthoritativeCopy>false</AuthoritativeCopy>
      <DocumentStatuses>
         <DocumentStatus>
            <ID>1</ID>
            <Name>Document_Name</Name>
            <TemplateName>radio parents</TemplateName>
            <Sequence>1</Sequence>
         </DocumentStatus>
      </DocumentStatuses>
   </EnvelopeStatus>
   <DocumentPDFs>
      <DocumentPDF>
         <Name>DocumentPDF_Name</Name>
         <PDFBytes>PDFBytes_Information</PDFBytes>
      </DocumentPDF>
   </DocumentPDFs>
</DocuSignEnvelopeInformation>