docusignapi - 如何设置网络 Hook 来检查 DocuSign 信封状态?

标签 docusignapi

我编写的代码使用信封向客户端请求签名,如本教程中所示:

https://www.docusign.com/developer-center/recipes/request-a-signature-via-email-using-a-template

我的问题是,如何定义可用于更新信封状态的网络 Hook URL?一旦客户签署文件,我希望收到通知并能够更新我的数据库中的信封状态。这可能吗?

EnvelopeDefinition 类是否公开了一些允许我定义网络钩子(Hook) url 的属性?

最佳答案

更新

我们现在有一系列新的推荐 WebHook 代码示例,它们使用无服务器功能和基于云的可靠队列服务。这些示例使您能够在防火墙内接收和处理 DocuSign webhook 通知,而无需更改文件墙。

现在可以使用 Node.js 的示例。正在编写 C#、Java、PHP 和 Python 的示例。

  • 亚马逊listenerworker Node.js 示例
  • 天蓝色 listenerworker Node.js 示例
  • 谷歌云listenerworker Node.js 示例

  • format of the webhook XML messages is documented .

    备注 Connect 指南(第 2 页上的 2016 年 3 月日期)已过时,并且在许多情况下不正确。新指南正在制作中。本指南对 XML 格式信息很有用。

    WSDL 文件 ,包括通知消息格式为available.

    要查看返回的 XML 消息,以下是已完成信封的示例通知:
    <?xml version="1.0" encoding="utf-8"?>
    <DocuSignEnvelopeInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
    <EnvelopeStatus>
        <RecipientStatuses>
        <RecipientStatus>
            <Type>Signer</Type>
            <Email>signer_email@example.com</Email>
            <UserName>Signer's name</UserName>
            <RoutingOrder>1</RoutingOrder>
            <Sent>2020-05-23T12:43:07.22</Sent>
            <Delivered>2020-05-23T12:43:14.767</Delivered>
            <Signed>2020-05-23T12:43:18.22</Signed>
            <DeclineReason xsi:nil="true"/>
            <Status>Completed</Status>
            <RecipientIPAddress>141.226.182.70</RecipientIPAddress>
            <ClientUserId>1000</ClientUserId>
            <CustomFields/>
            <TabStatuses>
            <TabStatus>
                <TabType>SignHere</TabType>
                <Status>Signed</Status>
                <XPosition>427</XPosition>
                <YPosition>531</YPosition>
                <TabLabel>Sign Here</TabLabel>
                <TabName>SignHere</TabName>
                <TabValue/>
                <DocumentID>1</DocumentID>
                <PageNumber>1</PageNumber>
            </TabStatus>
            </TabStatuses>
            <AccountStatus>Active</AccountStatus>
            <RecipientId>56e11847-da17-43c3-95f6-d4b675af8621</RecipientId>
        </RecipientStatus>
        </RecipientStatuses>
        <TimeGenerated>2020-05-23T12:43:38.7282968</TimeGenerated>
        <EnvelopeID>cd67ff4a-6cb1-42f3-87d3-f7c149031549</EnvelopeID>
        <Subject>Please sign the attached document</Subject>
        <UserName>Larry Kluger</UserName>
        <Email>larry@worldwidecorp.us</Email>
        <Status>Completed</Status>
        <Created>2020-05-23T12:43:06.753</Created>
        <Sent>2020-05-23T12:43:07.253</Sent>
        <Delivered>2020-05-23T12:43:14.83</Delivered>
        <Signed>2020-05-23T12:43:18.22</Signed>
        <Completed>2020-05-23T12:43:18.22</Completed>
        <ACStatus>Original</ACStatus>
        <ACStatusDate>2020-05-23T12:43:06.753</ACStatusDate>
        <ACHolder>Larry Kluger</ACHolder>
        <ACHolderEmail>larry@worldwidecorp.us</ACHolderEmail>
        <ACHolderLocation>DocuSign</ACHolderLocation>
        <SigningLocation>Online</SigningLocation>
        <SenderIPAddress>208.113.165.37 </SenderIPAddress>
        <EnvelopePDFHash/>
        <CustomFields>
        <CustomField>
            <Name>Team</Name>
            <Show>True</Show>
            <Required>False</Required>
            <Value/>
        </CustomField>
        <CustomField>
            <Name>Office</Name>
            <Show>True</Show>
            <Required>False</Required>
            <Value/>
        </CustomField>
        <CustomField>
            <Name>Order ID</Name>
            <Show>True</Show>
            <Required>False</Required>
            <Value/>
        </CustomField>
        <CustomField>
            <Name>AccountId</Name>
            <Show>false</Show>
            <Required>false</Required>
            <Value>4197223</Value>
            <CustomFieldType>Text</CustomFieldType>
        </CustomField>
        <CustomField>
            <Name>AccountName</Name>
            <Show>false</Show>
            <Required>false</Required>
            <Value>World Wide Corp</Value>
            <CustomFieldType>Text</CustomFieldType>
        </CustomField>
        <CustomField>
            <Name>AccountSite</Name>
            <Show>false</Show>
            <Required>false</Required>
            <Value>demo</Value>
            <CustomFieldType>Text</CustomFieldType>
        </CustomField>
        </CustomFields>
        <AutoNavigation>true</AutoNavigation>
        <EnvelopeIdStamping>true</EnvelopeIdStamping>
        <AuthoritativeCopy>false</AuthoritativeCopy>
        <DocumentStatuses>
        <DocumentStatus>
            <ID>1</ID>
            <Name>Example document</Name>
            <TemplateName/>
            <Sequence>1</Sequence>
        </DocumentStatus>
        </DocumentStatuses>
    </EnvelopeStatus>
    <TimeZone>Pacific Standard Time</TimeZone>
    <TimeZoneOffset>-7</TimeZoneOffset>
    </DocuSignEnvelopeInformation>
    

    关于docusignapi - 如何设置网络 Hook 来检查 DocuSign 信封状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37244961/

    相关文章:

    jwt - 使用组织管理员进行 DocuSign 服务集成身份验证以授予应用程序同意并模拟每个人

    curl - SSL 证书验证失败

    docusignapi - SOAP : RequestRecipientToken - "Invalid Recipient" despite matching from RequestStatus

    soap - 获取用于调试的 SOAP 跟踪不起作用

    node.js - 为什么请求 docusign JWT token 时出现错误

    docusignapi - INVALID_REQUEST_PARAMETER - 在多部分形式的 Content-Disposition header 中找不到文件名

    ios - DocuSign 复写本未收到通知

    python - 使用元素树 findall 解析 XML 命名空间

    docusignapi - 获取信封地址

    certificate - 电子签名公司如何创建有效的数字签名