kamranwali | Posts: 27

Cannot send package without approvals

0 votes

Hi,

I am getting below error while creating the package

Could not send the package. Exception: The remote server returned an error: (400) Bad Request. HTTP POST on URI https://sandbox.esignlive.com/api/packages/Rm-5vsjnTEtXulzytyawcbPNo1Q=. Optional details: {"messageKey":"error.validation.sendPackage.noApprovals","message":"Cannot send package without approvals.","code":400,"name":"Validation Error"}

I am using c# and below is the code I use.

 DocumentPackage documentPackage =
                PackageBuilder.NewPackageNamed("Consumer documents")
                    .DescribedAs("This is a package created using the eSignLive SDK")
                    .ExpiresOn(DateTime.Now.AddMinutes(100))
                    .WithEmailMessage("This message should be delivered to all signers")
                    .WithoutAutomaticCompletion()
                    .Build();

            foreach (var signee in requestDto.Signees)
            {
                var signer = SignerBuilder.NewSignerWithEmail(signee.Email)
                      .WithCustomId(signee.CustomId)
                      .WithFirstName(signee.FirstName)
                      .WithLastName(signee.LastName)
                      .WithSMSSentTo(signee.MobileNumber)
                      .SigningOrder(signee.SigningOrder)
                      .Build();

                documentPackage.Signers.Add(signer);
            }

            var document1 = DocumentBuilder.NewDocumentNamed("DirectDebitForm")

                .FromStream(fs, DocumentType.PDF)
                .WithId("DirectDebitForm")
                .WithExtractionType(ExtractionType.TEXT_TAGS)
                .EnableExtraction().Build();

            documentPackage.Documents.Add(document1);

            var packageId = ossClient.CreateAndSendPackage(documentPackage);

I am adding the signees dynamically through the loop.

 

Interesting thing is if I add signees without loop it worked, so the below code is working.

    var signer1 = SignerBuilder.NewSignerWithEmail(signee1Email)
                          .WithCustomId("Signer1")
                          .WithFirstName("John")
                          .WithLastName("Smith")
                          .SigningOrder(1)
                          .Build();

    var signer2 = SignerBuilder.NewSignerWithEmail(signee2Email)
                          .WithCustomId("Signer2")
                          .WithFirstName("abc")
                          .WithLastName("xyz")
                          .SigningOrder(2)
                          .Build();

    documentPackage.Signers.Add(signer1);
    documentPackage.Signers.Add(signer2);

We have to add signees in a loop as the number of singees varies.

 

Thanks,

Kamran

 

 


Duo_Liang | Posts: 3776

Reply to: Cannot send package without approvals

0 votes

Hi Kamran,

 

Thanks for your post! I did a quick in the backoffice and it turned out that your two signers' custom ID are not "Signer1" and "Signer2". (they are "12345" and "54321")

Because text tags require the custom ID / role name to match the tag. (In SDK modelling, all of the role ID, signer ID and role name are the same as custom ID) Mismatch will cause the text tags failed to be extracted and there's thus no signature get detected.

 

Duo


kamranwali | Posts: 27

Reply to: Cannot send package without approvals

0 votes

Hi Duo,

 

Yes signers custom id was the issue, thanks for you help.

 

kamran


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off