Embedded Requesting (iFrame)

Setting up Embedded Requesting will enable you to integrate the preparation/sending of documents and the creation of templates directly into your website or application using an iFrame. All you need is your API Access Key, a server-side API request and our Embedded Requesting JavaScript library for the client side.

Server Side

The first step to using embedding requesting is deciding whether to use an existing document/template or to create a new one.

Use existing document/template: If you already have a document/template, all you need to do is fetch the respective document/template claim URL using a standard Get Document/Template call from the eversign API.

Create new document/template: If the document/template you would like to embed has not been created yet, you will be required to either create a new document (Create Document), create a new template (Create Template) or create a document from a template (Use Template).

Drafts only Please keep in mind that only template and document drafts are eligible for embedded requesting. Make sure that the is_draft parameter is set to 1 for any templates or documents you would like to use embedded requesting for.

Get Embedded Requesting Claim URL HTTP GET

API Request

A successful API request to one of the API methods mentioned above will return an array containing all document/template data, including a embedded_claim_url object, which will contain the Embedded Requesting Claim URL to load in your iFrame.

https://api.eversign.com/api/document ? access_key = YOUR_ACCESS_KEY & business_id = 1 & document_hash = j6yMcaF2gQAIIQ

API Response

The API response below has been shortened for simplicity purposes. In order to see how the full response looks like, please jump to the Get Document section.

{ [...] "embedded_claim_url": "https://business.eversign.com/embedded_request/document/59162c77819fc4dafda0914601e5d7e9/1564165144/c8174d6d96919bed035cfb5e8b1f668d", [...] }

Client Side

After retrieving your Embedded Requesting Claim URL the next and final step is embedding an iFrame on your website. In order to make this as easy as possible, we've built a JavaScript library that places the iFrame into a DOM object of your choice and allows for customization.

To get started, include the following code on your website:

<script type="text/javascript" src="https://static.eversign.com/js/embedded-requesting.js"></script>

Once you have included the JavaScript library on your website, simply include the following code and specify all required options to display your iFrame.

eversignEmbeddedRequesting.open({ url: "https://business.eversign.com/embedded_request/document/59162c77819fc4dafda0914601e5d7e9/1564165144/c8174d6d96919bed035cfb5e8b1f668d",    containerID: "container", width: 1000, height: 800, events: { loaded: function () { console.log("loaded Callback"); }, submit: function () { console.log("submit Callback"); }, error: function () { console.log("error Callback"); } } });

The eversign.open function comes with a number of parameters:

Parameter Description
url This is where the Embedded Requesting Claim URL you retrieved earlier is placed.
containerID The ID of a DOM object on your website which your iFrame will be placed into. (e.g. myTable for <table id="myTable">)
width The width of your iFrame in pixels.
height The height of your iFrame in pixels.
events.loaded Callback function triggered when the iFrame has finished loading.
events.submit Callback function triggered when the document editor has been successfully submitted.
events.error Callback function triggered when the iFrame or document failed loading, or when the submission of the document editor failed.

Recommended iFrame Size For maximum usability, a minimum iFrame pixel width of 1000 and a minimum iFrame pixel height of 800 are recommended. The minimum allowed iFrame pixel width is 801.