Copy link to clipboard
Copied
SENDER_SIGNS_LAST no longer works when sending agreements. Error message states that "Signature Flow cannot be specified in hybrid routing". How can we turn off hybrid routing?
Copy link to clipboard
Copied
Hello Shaun,
Can you share the request code used while using REST API call?
-Rijul
Copy link to clipboard
Copied
CourseWriterAgreementInfo cwi = new CourseWriterAgreementInfo();
DocumentCreationInfo documentCreationInfo = new DocumentCreationInfo();
PostSignOptions postSignOptions = new PostSignOptions()
{
redirectUrl = "http://localhost:58455/CE/AdobeSignHandler?" + queryString
};
documentCreationInfo.postSignOptions = postSignOptions;
//documentCreationInfo.callbackInfo = "https://localhost:58455/CE/Agreements?courseID=1035";
documentCreationInfo.signatureType = SignatureType.ESIGN;
documentCreationInfo.daysUntilSigningDeadline = 300;
documentCreationInfo.signatureFlow = AdobeSignApi.Models.SignatureFlow.SENDER_SIGNS_LAST;
AdobeSignApi.Models.FileInfo fileInfos = new AdobeSignApi.Models.FileInfo()
{
libraryDocumentId = _agreement.agreementTemplateId
};
documentCreationInfo.fileInfos = new List<AdobeSignApi.Models.FileInfo> { (fileInfos) };
documentCreationInfo.name = _agreement.agreementName;
RecipientSetInfo RecipientSetInfo = new RecipientSetInfo();
RecipientSetInfo.recipientSetRole = RecipientRole.SIGNER;
RecipientSetInfo.signingOrder = 1;
RecipientSetInfo.recipientSetMemberInfos = new List<AdobeSignApi.Models.RecipientSetMemberInfo> { new AdobeSignApi.Models.RecipientSetMemberInfo() {
email=_agreement.courseWriterAgreement.courseWriterEmailAddress } };
//RecipientSetInfo.privateMessage = "Agrement sent from Library Document";
documentCreationInfo.recipientSetInfos = new List<RecipientSetInfo> { RecipientSetInfo };
//Set External Id Options
ExternalId externalId = new AdobeSignApi.Models.ExternalId { group = "", id = externalId_id, @namespace = "" };
documentCreationInfo.externalId = externalId;
//Ends here
cwi.documentCreationInfo = documentCreationInfo;
//Interactive options.
Options interactiveOptions = new Options();
interactiveOptions.authoringRequested = false;
interactiveOptions.autoLoginUser = true;
interactiveOptions.noChrome = true;
interactiveOptions.sendThroughWeb = true;
interactiveOptions.sendThroughWebOptions = new SendThroughWebOptions();
interactiveOptions.sendThroughWebOptions.fileUploadOptions = new FileUploadOptions() { libraryDocument = true, localFile = true, webConnectors = true };
cwi.options = interactiveOptions;
CEAdobeSignClient clientSign = _agreement.addAccessToken();
//Interactive options ends.
AgreementCreationResponse _agreementInfo = new AgreementCreationResponse();
_agreementInfo = clientSign.CreateAgreement(cwi);
_agreement.agreementCreationResponse = _agreementInfo;
*--------------------------------------*The API call is ***************************
public AgreementCreationResponse CreateAgreement(CourseWriterAgreementInfo newAgreement)
{
string serializedObject = JsonConvert.SerializeObject(newAgreement);
using (StringContent content = new StringContent(serializedObject, Encoding.UTF8))
{
content.Headers.Remove("Content-Type");
content.Headers.Add("Content-Type", "application/json");
HttpResponseMessage result = client.PostAsync(apiEndpointVer + "/agreements", content).Result;
if (result.IsSuccessStatusCode)
{
string response = result.Content.ReadAsStringAsync().Result;
AgreementCreationResponse agreement = JsonConvert.DeserializeObject<AgreementCreationResponse>(response);
return agreement;
}
else
{
string response = result.Content.ReadAsStringAsync().Result;
//HandleError(result.StatusCode, response, false);
return null;
}
}
}