2014-10-29 71 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相關帖子上對我當前工作過程的回答。