Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

REST API SENDER_SIGNS_LAST

New Here ,
Aug 17, 2016 Aug 17, 2016

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?

912
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 10, 2016 Sep 10, 2016

Hello Shaun,

Can you share the request code used while using REST API call?

-Rijul

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2017 Nov 02, 2017
LATEST

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;

                }

            }

        }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines