webmerge | Posts: 3

Upload Document with Text Anchors - 500 error

0 votes
I'm receiving a 500 error when I upload a document to /packages with the following roles and approvals. Any idea where the error could be coming from? Here's the request detail:
POST https://sandbox.esignlive.com/api/packages

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="eSignLive - test -- 2017-03-23 07_38pm.pdf"

%PDF-1.4 ....  (rest of file removed)


------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="payload"

{
  "name": "Please sign this document",
  "type": "PACKAGE",
  "status": "SENT",
  "roles": [
    {
      "id": "signer1",
      "type": "SIGNER",
      "signers": [
        {
          "lastName": "test",
          "firstName": "test",
          "email": "[email protected]"
        }
      ]
    }
  ],
  "documents": [
    {
      "name": "eSignLive - test -- 2017-03-23 07_41pm.pdf",
      "index": 0,
      "id": "document1",
      "extract": true,
      "approvals": [
        {
          "role": "signer1",
          "fields": [
            {
              "type": "SIGNATURE",
              "width": 250,
              "height": 50,
              "extract": true,
              "extractAnchor": {
                "text": "[signature1]",
                "anchorPoint": "BOTTOMRIGHT",
                "index": 0,
                "width": 250,
                "height": 50,
                "leftOffset": 0,
                "topOffset": 0
              }
            }
          ]
        }
      ]
    }
  ]
}

------WebKitFormBoundary7MA4YWxkTrZu0gW--
Response: {"messageKey":"error.internal.default","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}

Approved Answer
harishaidary | Posts: 1812

Reply to: Upload Document with Text Anchors - 500 error

0 votes
Hi there, There was a couple of typos/missing fields in your json payload. Can you try again with the following one:
{
  "roles": [
    {
      "id": "signer1",
      "type": "SIGNER",
      "signers": [
        {
          "lastName": "test",
          "firstName": "test",
          "email": "[email protected]"
        }
      ],
      "name": "signer1"
    }
  ],
  "name": "Please sign this document",
  "type": "PACKAGE",
  "status": "DRAFT",
  "documents": [
    {
      "name": "eSignLive - test -- 2017-03-23 07_41pm.pdf",
      "index": 0,
      "id": "document1",
      "approvals": [
        {
          "role": "signer1",
          "fields": [
            {
              "type": "SIGNATURE",
              "extract": false,
              "extractAnchor": {
                "text": "[signature1]",
                "index": 0,
                "width": 150,
                "height": 40,
                "anchorPoint": "BOTTOMRIGHT",
                "characterIndex": 0,
                "leftOffset": 0,
                "topOffset": -50
              },
              "left": 0,
              "subtype": "FULLNAME",
              "top": 0
            }
          ]
        }
      ]
    }
  ]
}

webmerge | Posts: 3

Reply to: Upload Document with Text Anchors - 500 error

0 votes
Worked like a charm! Thanks for the help. It would be great to get a better error message. I did a little more testing and if you leave out one of the parameters it causes a 500 error, but no explanation for what parameter is wrong/missing. Thanks again :)

harishaidary | Posts: 1812

Reply to: Upload Document with Text Anchors - 500 error

0 votes
I definitely agree with you on that. Our maintenance team is aware of this issue and are currently working on improving error messages. Glad it worked for you :)

mwilliams | Posts: 957

Reply to: Upload Document with Text Anchors - 500 error

0 votes
We will also have a feature in a not-too-distant future called Text Tags. It will work similar to Text Anchors only with much more capability for automatic field placement. This would definitely help cut down on the errors with tag naming. :)

webmerge | Posts: 3

Reply to: Upload Document with Text Anchors - 500 error

0 votes
That would be AMAZING --- 1000% better UX for customers settings up docs/integrations.

harishaidary | Posts: 1812

Reply to: Upload Document with Text Anchors - 500 error

0 votes
Hi webmerge, The text tag feature is now available to use on the sandbox environment. Here's a short blog I wrote on how to use it: https://www.esignlive.com/blog/esignlive-how-to-text-tags/

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