我們已經從SOAP API遷移到REST API並嘗試「在現有信封上添加/刪除收件人」。CorrectAndResendEnvelope SOAP API現在是否支持REST API?
我們在SOAP API中使用CorrectAndResendEnvelope方法和RecipientCorrection屬性。這個方法和屬性是否有相應的REST API?
試圖做這樣的事情在REST:
DocuSignWeb.Correction correction = new DocuSignWeb.Correction();
correction.RecipientCorrections[0] = new DocuSignWeb.RecipientCorrection();
correction.RecipientCorrections[0].PreviousUserName = pOldName;
correction.RecipientCorrections[0].CorrectedUserName = pNewName;
correction.RecipientCorrections[0].PreviousEmail = pOldEmail;
correction.RecipientCorrections[0].CorrectedEmail = pNewEmail;
correction.RecipientCorrections[0].PreviousRoutingOrder = pOldRoutingOrder;
correction.RecipientCorrections[0].CorrectedRoutingOrder = pNewRoutingOrder;
correction.RecipientCorrections[0].Resend = true;
correction.RecipientCorrections[0].ResendSpecified = true;
DocuSignWeb.CorrectionStatus correctionStatus = _apiClient.CorrectAndResendEnvelope(correction);
感謝您的答覆,我是新來的REST和不斷收到與下面的代碼中的錯誤請求400響應:
我已經從其他樣品的標準和基本URL ... authenticateStr
_recipientID,pNewEmail,pNewName和pNewRoutingOrder被作爲參數傳遞給程序。
串envDef = 「HTTP://www.docusign.com/restapi \」>」 + 「」 + 「」 + 「」 + _recipientId + 「」 + 「」 + pNewEmail + 「」 + 「」 + pNewName + 「」 + 「」 + pNewRoutingOrder + 「」 + 「」 + 「」 + 「」;
url = baseURL + "/envelopes/" + pEnvelopeID + "/recipients";
request = (HttpWebRequest)WebRequest.Create(url);
request.Headers.Add("X-DocuSign-Authentication", authenticateStr);
request.ContentType = "application/xml";
request.Accept = "application/xml";
request.ContentLength = envDef.Length;
request.Method = "PUT";
// write the body of the request
byte[] body = System.Text.Encoding.UTF8.GetBytes(envDef);
Stream dataStream = request.GetRequestStream();
dataStream.Write(body, 0, envDef.Length);
dataStream.Close();
// read the response
webResponse = (HttpWebResponse)request.GetResponse();
sr.Close();
responseText = "";
sr = new StreamReader(webResponse.GetResponseStream());
responseText = sr.ReadToEnd();
我覺得有一個當前錯誤在系統中使用XML格式與此特定API調用(即更正收件人信息)。我在下面發佈的JSON作品,一旦我知道XML版本已修復此問題,我會在這裏發佈...... – Ergin