harishkonda | Posts: 26

Document upload to package using REST API failing

0 votes
I have done multiple trials and not able to end up with successful results for uploading a document to a Transaction. I am using REST API and here is the RAW request ----Request---- POST https://sandbox.esignlive.com/api/packages/ggj1mkdQEWLsmP1tsWSj7T9sbjQ=/documents HTTP/1.1 Host: sandbox.esignlive.com Connection: keep-alive Content-Length: 186008 Accept: text/html Cache-Control: no-cache Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Postman-Token: c2b02825-5b51-ec7d-a7d2-4c42d489d6d3 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary3r8scFGChPRPOO4u Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.8 ------WebKitFormBoundary3r8scFGChPRPOO4u Content-Disposition: form-data; name="file"; filename="cleaning_contract.pdf" Content-Type: application/pdf %PDF-1.6 % 179 0 obj 185295 %%EOF ------WebKitFormBoundary3r8scFGChPRPOO4u-- ---Response--- HTTP/1.1 302 Found Server: nginx Date: Tue, 08 Aug 2017 01:18:10 GMT Content-Length: 0 Connection: keep-alive X-Powered-By: Undertow Location: https://sandbox.esignlive.com/error?error=eyJtZXNzYWdlS2V5IjoiZXJyb3IuaW50ZXJuYWwuZGVmYXVsdCIsIm1lc3NhZ2UiOiJVbmV4cGVjdGVkIGVycm9yLiBXZSBhcG9sb2dpemUgZm9yIGFueSBpbmNvbnZlbmllbmNlIHRoaXMgbWF5IGhhdmUgY2F1c2VkIHlvdSwgcGxlYXNlIHRyeSBhZ2Fpbi4gSWYgdGhlIHByb2JsZW0gcGVyc2lzdHMsIHBsZWFzZSBjb250YWN0IG91ciBzdXBwb3J0IHRlYW0uIiwiY29kZSI6NTAwLCJuYW1lIjoiVW5oYW5kbGVkIFNlcnZlciBFcnJvciJ9 P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT" Strict-Transport-Security: max-age=31536000; includeSubdomains; I was following the Postman example, I tried with and without JSON payload about fields, but still document is not getting uploaded to Transaction. Can we get any possible guidance on this issue ?

harishkonda | Posts: 26

Reply to: Document upload to package using REST API failing

0 votes
Trying to upload document to Transaction using REST API, getting error. Please refer to attachment for req and resp error. I tried following the article or instructions following provided in the Document upload using Postman article.

harishkonda | Posts: 26

Reply to: Document upload to package using REST API failing

0 votes
Req--- -------------------------------------------------------------------------------------------------------- POST https://sandbox.esignlive.com/api/packages/ggj1mkdQEWLsmP1tsWSj7T9sbjQ=/documents HTTP/1.1 Host: sandbox.esignlive.com Connection: keep-alive Content-Length: 186008 Accept: text/html Cache-Control: no-cache Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop Authorization: Basic XXXXXXXXXXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Postman-Token: ae3a1c88-221a-fbd2-a051-f109fe80e5be Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryKwCjv7NIJBI7cAxg Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.8 ------WebKitFormBoundaryKwCjv7NIJBI7cAxg Content-Disposition: form-data; name="file"; filename="cleaning_contract.pdf" Content-Type: application/pdf ALL THE FILE PDF CONTENT is replaced. ------WebKitFormBoundaryKwCjv7NIJBI7cAxg-- -------------------------------------------------------------------------------------------------------- Response --- HTTP/1.1 302 Found Server: nginx Date: Tue, 08 Aug 2017 03:04:25 GMT Content-Length: 0 Connection: keep-alive X-Powered-By: Undertow Location: https://sandbox.esignlive.com/error?error=eyJtZXNzYWdlS2V5IjoiZXJyb3IuaW50ZXJuYWwuZGVmYXVsdCIsIm1lc3NhZ2UiOiJVbmV4cGVjdGVkIGVycm9yLiBXZSBhcG9sb2dpemUgZm9yIGFueSBpbmNvbnZlbmllbmNlIHRoaXMgbWF5IGhhdmUgY2F1c2VkIHlvdSwgcGxlYXNlIHRyeSBhZ2Fpbi4gSWYgdGhlIHByb2JsZW0gcGVyc2lzdHMsIHBsZWFzZSBjb250YWN0IG91ciBzdXBwb3J0IHRlYW0uIiwiY29kZSI6NTAwLCJuYW1lIjoiVW5oYW5kbGVkIFNlcnZlciBFcnJvciJ9 P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT" Strict-Transport-Security: max-age=31536000; includeSubdomains; --------------------------------------------------------------------------------------------------------

Attachments
harishaidary | Posts: 1812

Reply to: Document upload to package using REST API failing

0 votes
Hi there, Please refrain from posting document binaries in the forum as our system will filter it as spam. As for your issue, I see that you are using my example document "cleaning_contract.pdf". Can you take screenshots of your Postman and share it here? I want to have a look at your settings.

harishkonda | Posts: 26

Reply to: Document upload to package using REST API failing

0 votes
Hey Haris, Sorry, because of binary or so, I had issues with the post, and had to update multiple times. Initially, the Post was not even showing up and was empty after sometime, so I have to do multiple updates. But this morning, I see all together. I wanted to make sure my request is valid, so posted the maximum information I can. Yes, I am following your example article as is with many trials, however, here is the latest simple test I did with no luck and as per your request, I have attached the screenshot of Postman. Please let me know if you need any additional information.

harishaidary | Posts: 1812

Reply to: Document upload to package using REST API failing

0 votes
The exact same settings worked for me on Postman. Couple of questions for you: 1. What is the error you are getting from postman? (not Fiddler) 2. Is it only document upload that is failing? Or are you able to make any other calls? (e.g. create empty package) 3. Can you try resetting your Postman? (i.e. clear your Postman history and relaunch the app)

harishkonda | Posts: 26

Reply to: Document upload to package using REST API failing

0 votes
Please find my answers 1. What is the error you are getting from postman? (not Fiddler) -- in Postman, I dont get success response or the document id nor any thing, have attached the screenshot of the response. 2. Is it only document upload that is failing? Or are you able to make any other calls? (e.g. create empty package) -- a) I tried both examples from your tutorial, package creation example with document, got successful response with package id, but still document is not uploaded in package. b) I did try only document upload example, but document is not getting uploaded. 3. Can you try resetting your Postman? (i.e. clear your Postman history and relaunch the app) -- Did many many times for hours, still not working. If their is any way we can trace the req on eSign servers and find out the problem, it would be helpful for us to understand. Let me know for any additional questions.

Attachments
harishaidary | Posts: 1812

Reply to: Document upload to package using REST API failing

0 votes
Looking at your account, you were able to upload that document and send out the package (h7gn6fg3ud18a5v2L4_MGDpSnWw=). Did you create that package with the document in one call? (https://www.esignlive.com/blog/esignlive-how-to-using-postman/)

harishkonda | Posts: 26

Reply to: Document upload to package using REST API failing

0 votes
For the package id in question, I was exploring the UI and uploaded document using UI and not via REST API. yes, I created the package with document, but document is not uploaded to the package, even the package is created successfully. I have tried both the examples from your postman article. Package creation with document(pkg created successfully, but document did not upload), just document upload to an existing package, both cases, document did not get upload. I am having issues only with document upload using REST API.

harishaidary | Posts: 1812

Reply to: Document upload to package using REST API failing

0 votes
Can you email me at [email protected]? We'll setup a screenshare and try to figure out why is document upload failing.

harishaidary | Posts: 1812

Reply to: Document upload to package using REST API failing

0 votes
My pleasure :)

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