- Clone this Repository
- Install Dependencies with:
npm install
.
createdoc.js
- Add your team subdomain in "baseUrl".
- Create a Document at createdoc.js:
i) Fill the header with your Token in "your_token_here".
ii) Add the data in "file_from_url", a sharable url with a .pdf document.
Obs: You can send a pdf document encoding it to base64, for that, use the snippet provided in 'pdf2base64.pdf'. For that, use
file_from_content
andfile_from_content_name
andname
. Obs2: To run tests, use the attached 'demo_document.pdf'. - Run the code with:
node createdoc.js
.
createsignrequests.js
- Add your team subdomain in "baseUrl".
DATA OBJECT:
- Add your newly created document in data.document.
- Add the signers information in data.signers[].
- Add the sender e-mail address at "from_email".
- Add your customized message.
- Add any additional information in the Data Object, such as "who" needs to sign or subject.
For more information check the documentation for the "/signrequests/" endpoint.
https://signrequest.com/api/v1/docs/#tag/signrequests
- Add your team's Token in the "createSignRequest" header at "Authorization".
quicklycreate.js
To send a request to the "/signrequest-quick-create/" endpoint, which incorporates both previous endpoints in one. You can use "quicklycreate.js" file.
For more info, check the documentation: https://signrequest.com/api/v1/docs/#tag/signrequest-quick-create
cancelsr.js
To cancel a sign request, send a POST request to /signrequests/uuid/cancel_signrequest/
including the sign request's uuid.
resendsr.js
To resend the email of a sign request, send a POST request to /signrequests/uuid/resend_signrequest_email/
including the sign request's uuid.
You can use this boilerplate for an iframe embeded url of a sign request.
See example of how to create new and modify existing PDF documents via Node.js, containing placeholders and texts that can be sent as SignRequests. This example uses HummusJS: https://github.com/galkahana/HummusJS
See: