RightSignature API4 PUT Sending Request

  • 2
  • Question
  • Updated 2 weeks ago
Hi, 

I am trying to update my Classic RightSignature code to work with the new API and I have a few questions.

Before we were able to set our xml.value to an URL that pointed to where our documents were being displayed on our website.  Is there still an option to send an URL for our signable documents.  If so, can you please point me in the direction on how I can make this work?

Our site generates custom legal documents populated with different user's information (name, address, etc.). I am assuming we are not able to use a template since each document will need to contain some different information, is this correct? 


I have been trying without any success to send a one-off document and I am stuck at step 2 -- "To upload the file, do a PUT to the response's upload_url with the file in the body. Ex. response"

I am able to do the first POST request and I receive a response with an upload_url, id, etc. However, I am at lost as to what I need to send in the PUT request. The file_content I am setting in my request.body is the data I have saved from reading a file.  

     uri = URI.parse upload_url

      http = Net::HTTP.new uri.host, uri.port
      http.use_ssl = true
      http.verify_mode = OpenSSL::SSL::VERIFY_PEER


      request = Net::HTTP::Put.new uri.request_uri
      request['Content-Type'] = 'application/pdf'
      request.body = file_content


      response = http.request request
      response.body 

Doing the following I get a <Net::HTTPOK 200 OK readbody=true> and when I call response.body I get " " (an empty string)


Finally, I would like to know if there is a way to upload all signed documents into our ShareFile account or if I can send a file to be signed with RightSignature from a ShareFile folder? The pdf will need to be uploaded back into the same folder once signed. 

I would greatly appreciate a quick response as I have spent the past month waiting for someone at RightSignature to upgrade our account so we could start this process. I only have a week before our current live site will be migrated to the new version. 


Photo of Amanda

Amanda

  • 17 Posts
  • 0 Reply Likes
  • extremely frustrated, upset, angry

Posted 3 weeks ago

  • 2
Photo of Lee

Lee

  • 1 Post
  • 0 Reply Likes
I'm in the same boat Amanda and it's ridiculous. Basically given a two week deadline and in the middle of a pandemic too! I'll give this a day max to figure out and then I'll be going back to their competitor since I came here from there and still have all the old code I can literally spend 5 minutes to reactivate. 

Whoever decided to give us such a short timeline to do this migration with NO examples or updating of their github is going to cost this company a lot of money in lost revenue.

I'm pissed right now.
Photo of Amanda

Amanda

  • 20 Posts
  • 0 Reply Likes
I would really appreciate some answers to my questions above. I have waited 4 days and there does not seem to be an overwhelming amount of new questions being posted on the forum to cause such a delay in response. 

As Lee mentioned it is extremely ridiculous that there are no examples provided. For the ShareFile API, there are loads of examples for different programming languages. As there was for the classic RightSignature API. How can it be that RightSignature couldn't be bothered to publish a bit of help? There are developers of all different levels working to implement the changes required and it just seems very lazy for such a large company to not provide adequate documentation. 
Photo of Saravanan Kannan

Saravanan Kannan, Software Engineer

  • 121 Posts
  • 15 Reply Likes
Hi Amanda,

If you got a 200 for the PUT request (2nd step), after uploading the file, then you can trigger the 3rd and final step in the sending request, https://api.rightsignature.com/documentation/resources/v1/sending_requests/uploaded.en.html
This will trigger the actual processing of the document. And the processing status can be obtained from here
https://api.rightsignature.com/documentation/resources/v1/sending_requests.en.html

Also if you have a Sharefile account with newer RightSignature, you can trigger Self-sign/Send-for-Signature flows by right-clicking on any of the supported files inside Sharefile and yes after it is signed, the signed copy will be uploaded back to the same folder.

This works the other way as well, if you have the Sharefile archiving enabled on your RightSignature account (under Integrations), the signed copies will be uploaded to your sharefile folder.

Hope this helps.

Thanks
Saravanan
Photo of Amanda

Amanda

  • 20 Posts
  • 0 Reply Likes
Hi Saravanan,

It was throwing me off that the response.body for my PUT request was an empty string. Once I called the Post method it did upload the file. 

For Sharefile, we currently make a new folder for each of our clients using the ShareFile API. From our site, we upload different documents into each individual client's folder. As I will already have the folder_id, I want to know if the signed RightSignature document can go directly into a folder on ShareFile. If this is not possible can we upload a document using the ShareFile API into a folder and then send it out to RightSignature via the API? We do not want to have to enter into ShareFile to select and send a document. 

In the Classic RightSignature API, once POSTing the document to sign, RightSignature would return individual links for each signer. This allowed us to display links on our site so that each signer could click on their specific link and it would open their document for them to sign. We want to be able to offer our clients the option to sign either from our site or from the RightSignature email. In the documentation, I do not see anything about. The Classic API also provided information about the signing_status of each signer.  I do not see this information either. 

Thank you,
Amanda


Photo of Saravanan Kannan

Saravanan Kannan, Software Engineer

  • 121 Posts
  • 15 Reply Likes
Hi Amanda,

You cannot reference the sharefile item id and use RightSignature API to send a document from ShareFile. Currently this is not possible.

With sending request, it will just send out the emails to the signers. However to know the status of the document you sent using sending request, you can make use of the `document[callback_url]` parameter to receive status updates on the document.

Hope this clears some of your doubts.

Thanks
Saravanan
Photo of Amanda

Amanda

  • 20 Posts
  • 0 Reply Likes
Hi Saravanan, 

Before, once the users had signed the document in the Classic RightSignature API it would return an url pointing to the completed document. This allowed us to easily link from our site to the signed document. Looking at the document[callback_url] options I see that it returns the document_template_id. From this id can we generate a link to view the completed document? If so, where can I find this documentation?  

Thanks,
Amanda
Photo of Saravanan Kannan

Saravanan Kannan, Software Engineer

  • 121 Posts
  • 15 Reply Likes
Amanda,

You could use the GET documents/:id endpoint, https://api.rightsignature.com/documentation/resources/v1/documents/show.en.html with that id returned from document[callback_url]. And if the document is executed, you will get the merged_document_certificate_url, signature_certificate_url in the response. document_template_id  is document_id in this case.

Thanks
Saravanan