e28makaveli | Posts: 2

Cannot send package without approvals.

0 votes
I am trying to run a simple application which does not do much. It simply attempts to wrap a sample PDF around an e signature and the error I get is Silanis.ESL.SDK.EslServerException HResult=0x80131500 Message=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/8e_mjoZZHOqAhiDP_8bMcX8ZJdE=. Optional details: {"messageKey":"error.validation.sendPackage.noApprovals","message":"Cannot send package without approvals.","code":400,"name":"Validation Error"} Source=Silanis.ESL StackTrace: at Silanis.ESL.SDK.Services.PackageService.SendPackage(PackageId packageId) at Silanis.ESL.SDK.EslClient.SendPackage(PackageId id) at eSignLive.Services.EslPackageCreation.CreatePackage(FormModel model, String apiKey, String baseUrl) in ....... Help greatly appreciated.

Duo_Liang | Posts: 3776

Reply to: Cannot send package without approvals.

0 votes
Hi there, Just for my information, can you please attach the code you create the package? It seems when creating DocumentPackage object, you don't use .WithSingature() function to create an approval. And a standard way to create DocumentPackage looks like below:
DocumentPackage superDuperPackage = PackageBuilder
                        .NewPackageNamed("Test Package .NET")
                    .WithSettings(DocumentPackageSettingsBuilder
                        .NewDocumentPackageSettings())
                    .WithSigner(SignerBuilder
                        .NewSignerWithEmail("[email protected]")
                        .WithFirstName("Signer First Name")
                        .WithLastName("Signer Last Name")
                        .WithCustomId("Signer"))
                    .WithSigner(SignerBuilder
                        .NewSignerWithEmail("[email protected]")
                        .WithFirstName("Your First Name")
                        .WithLastName("Your Last Name"))
                    .WithDocument(DocumentBuilder.NewDocumentNamed("sampleAgreement")
                            .FromStream(fs, DocumentType.PDF)
                            .WithSignature(SignatureBuilder
                                    .SignatureFor("[email protected]")
                                    .OnPage(0)
                                    .AtPosition(175, 165))
                            .WithSignature(SignatureBuilder
                                    .SignatureFor("[email protected]")
                                    .OnPage(0)
                                    .AtPosition(550, 165))
                                  )
                    .Build();
Hope this could help you!

e28makaveli | Posts: 2

Reply to: Cannot send package without approvals.

0 votes
That was the problem, thank you.

Duo_Liang | Posts: 3776

Reply to: Cannot send package without approvals.

0 votes
Glad to hear that! Let us know if you have any other issues. :)

ahoytodd | Posts: 23

Reply to: Cannot send package without approvals.

0 votes
Hi, I'm getting the same error using the POSTMAN and the REST API. I currently have a 3 step process 1) Create a simple package and retrieve the package ID 2) Upload a Word Text Tagged document with ( I think) approvals. text tag is : {{esl:Signer1:Signature}} 3) Change the package status to Sent from Draft It fails at step 3 with: "code": 400, "message": "Cannot send package without approvals.", "messageKey": "error.validation.sendPackage.noApprovals", "name": "Validation Error" Where, oh where, am I going wrong? My code 1-Create Package { "name": "My Package via Postman", "type":"PACKAGE", "language":"en", "emailMessage":"", "description":"New Package from Postman", "autocomplete":true } 2-Upload a document { "documents": [ { "approvals": [ { "id": "ExampleSignatureId", "role": "Signer1", "fields": [ { "page": 0, "top": 200, "subtype": "LABEL", "height": 50, "left": 100, "width": 200, "id": "myLabelField", "type": "INPUT", "value": "Example label field value" }, { "page": 0, "top": 100, "subtype": "FULLNAME", "height": 50, "left": 100, "width": 200, "type": "SIGNATURE", "name": "ExampleSignatureId" } ], "name": "" } ], "id": "sample-contract", "name": "Test Document" } ], "status": "SENT", "type": "PACKAGE", "roles": [ { "id": "ExampleSignatureId", "type": "SIGNER", "signers": [ { "email": "[email protected]", "firstName": "John", "lastName": "Doe", "id": "Signer1" } ], "name": "Signer1" } ], "name": "TM Small File" } 3-Send the package { "status": "SENT" }

Duo_Liang | Posts: 3776

Reply to: Cannot send package without approvals.

1 votes
Hi ahoytodd, It seems you are adding roles and upload document at the same time in step2. Can you separate the process into 4 steps: #1. the same #1 #2. adding Roles once a time
HTTP Request
POST /api/packages/{packageId}/roles

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload
    {
      "id": "ExampleSignatureId",
      "type": "SIGNER",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "John",
          "lastName": "Doe",
          "id": "Signer1"
        }
      ],
      "name": "Signer1"
    }
#3. upload the document
HTTP Request
POST /api/packages/{packageId}/documents

HTTP Headers
Accept: text/html
Content-Type: multipart/form-data
Authorization: Basic api_key
in request body, select form-data, add a key named "file" and choose file type, then select your file as value add a key named "payload" and there seems something wrong with your json, as you were using text tags feature, so you need to set document extraction on and don't need to specify the approvals and set the x/y coordinates for your signatures: { "id": "sample-contract", "name": "Test Document", "extract": true, "data": { "esl_doc_extract_type": 1 } } #4. send package like you did. Hope this could help! Duo

ahoytodd | Posts: 23

Reply to: Cannot send package without approvals.

0 votes
Thanks. I've made some progress. However, the package create is automatically putting me, the owner as a recipient/signer. Is there a way to prevent this from happening, or to remove myself in step 2 when I set the roles? Thanks.

Duo_Liang | Posts: 3776

Reply to: Cannot send package without approvals.

0 votes
Hi ahoytodd, Adding sender as a recipient is a default behavior, and there's no way to prevent this. But you can remove your sender's name from dropdown list when doing in-person signing and from Designer Page. Could tell me more about why you want to prevent adding your sender as signer? Duo

ahoytodd | Posts: 23

Reply to: Cannot send package without approvals.

0 votes
Hi Duo, With a system to system integration we would not be using the GUI to perform the additional steps of removing the creator of the transaction as a recipient. For this type of integration we actually do not want or need the transaction creator on any transactions either as a signer, or a reviewer. If for all GUI based transactions, we have document prep groups that would assimilate all the transaction information but never need to be a signer, or reviewer, on any of the transactions. Todd

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