2014-10-29 66 views
0

时收到“无效的电子邮件地址,收件人”我有下面的XML成功创建一个信封:改变信封状态

<envelopeDefinition xmlns="http://www.docusign.com/restapi"> 
<status>created</status> 
<emailSubject>DocuSign Notification</emailSubject> 
<templateId>826882b3-63fd-4e3a-95c6-e9d901824xxx</templateId> 
<templateRoles> 
<templateRole> 
<email>[email protected]</email> 
<name>Ed Test</name> 
<roleName>Signer</roleName> 
<routingOrder>1</routingOrder> 
<clientUserId>25</clientUserId> 
<tabs>...LEFT OUT FOR BREVITY...</tabs> 
</templateRole></templateRoles></envelopeDefinition> 

当我试图与发送信封:

public string SendEnvelope(string envelopeID) 
{ 
    string url = baseURL + "/envelopes/" + envelopeID; 
    string requestBody = 
"<envelope>" + 
"<status>sent</status>" + 
"</envelope>"; 
    HttpWebRequest request = initializeRequest(url, "PUT", requestBody, email, password); 
    string response = getResponseBody(request); 
    return response; 
} 

我收到:

<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><errorCode>INVALID_EMAIL_ADDRESS_FOR_RECIPIENT</errorCode><message>The email address for the recipient is invalid. The recipient Id follows.</message></errorDetails> 

电子邮件地址没有任何问题。如果我创建的信封状态为“发送”而不是“创建”,它可以正常工作。如果试图更改信封状态,我只会收到此错误。有谁知道为什么发生这种情况,以及如何解决它?

+1

作为尝试解决此问题的下一步,我建议开启API日志记录并确认生成的API调用和参数与您期望的相符:https://www.docusign.com/support/new/documentation/ ndse-help/request-logging – 2014-10-30 13:29:31

+0

看起来很有用,谢谢,我会试试看。 – user3757872 2014-10-30 17:19:32

+1

我看到你在信封创建请求中设置了'clientUserId'属性,这意味着收件人将是一个嵌入签名者。我想知道这是否与您看到的错误有关......当您发送PUT请求发送信封时,我认为您应该为第一个收件人创建一个签名标记。 – Ergin 2014-11-03 22:57:19

回答

1

埃尔金是正确的。如果我更改我的流程以添加几个步骤来检索DocuSign创建的签名者GUID,那么它就可以工作。它仍然看起来像一个错误,或者至少是一个不一致的地方,当它被创建为“发送”而不是创建为“已创建”并立即变为“已发送”时,API以不同方式处理它,但它至少有一个解决方法。查看我在this相关帖子上对我当前工作过程的回答。