lindsay_ortiz

Receiving Error "Number of uploaded files does not match number of documents specified in package."

0 votes

I am trying to create a package and upload a document but I only get the error message "Number of uploaded files does not match number of documents specified in package."  I have looked through the API and other posts about this error message.  I have even tried to use the exact configuration as in this CodeShare: https://community.onespan.com/documentation/onespan-sign/codeshare/upload-document-through-multipartform-data-using-postman  I'm assuming there is an issue with the JSON body but I can't figure it out.

I am using Postman to test my calls but still no luck.  Can anyone help me figure out what is wrong?


Reply to: Receiving Error "Number of uploaded files does not match number of documents specified in package."

0 votes

Hi Lindsay,

 

Welcome to OneSpan Sign! Try to check your Postman setup against below screenshot:

6-11-3

A sample JSON payload could look like below:

{
  "roles": [
    {
      "id": "Role1",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "1.firstname",
          "lastName": "1.lastname",
          "company": "OneSpan Sign"
        }
      ]
    },
    {
      "id": "Role2",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "2.firstname",
          "lastName": "2.lastname",
          "company": "OneSpan Sign"
        }
      ]
    }
  ],
  "documents": [
    {
      "approvals": [
        {
          "role": "Role1",
          "fields": [
            {
              "page": 0,
              "top": 100,
              "subtype": "FULLNAME",
              "height": 50,
              "left": 100,
              "width": 200,
              "type": "SIGNATURE"
            }
          ]
        },
        {
          "role": "Role2",
          "fields": [
            {
              "page": 0,
              "top": 300,
              "subtype": "FULLNAME",
              "height": 50,
              "left": 100,
              "width": 200,
              "type": "SIGNATURE"
            }
          ]
        }
      ],
      "name": "Test Document"
    }
  ],
  "name": "Example Package",
  "type": "PACKAGE",
  "language": "en",
  "emailMessage": "",
  "description": "New Package",
  "autocomplete": true,
  "status": "SENT"
}

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Receiving Error "Number of uploaded files does not match number of documents specified in package."

0 votes

Glad to hear that! Feel free to post if you have any further questions.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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