API: Display of the electronic signature page online

Once a contract has been created for a given customer, you can continue the signing process directly from the SELL&SIGN cloud by integrating an iframe into your website. To achieve this, authentication must be delegated your website user. We offer a temporary token system that can be restricted to certain forms of use and/or access to a specific contract / customer / type of contract.

Creating a temporary token

In order to limit access to the signature page to the signatories you have defined, you must generate a temporary token to represent them and control their access.

The method to use is:


It can only be called in HTTP POST.

The content of POST data must be in JSON:

{ "actorId" : [actor id], 
   "time" : [time],
   "profile": "sign_contract",
   "parameters" : { 
	"contract_definition_id": [contract definition id],
	"customer_id" : [customer number],
 	"contract_id" : [contract id],
	"contractor_id" : [contractor id]
  • actor_id: “guest” user id that will be provided by Calinda
  • time: date in UTC milliseconds of expiry of the token
  • parameters:allows you to define the signatory’s authorized scope of action. Insert the customer (number field), contract (ID field) and signatory (ID field) identifiers obtained previously.

The service then returns a token of this type:


Displaying the Signature Page

This token is used like the authentication token described previously. To use in HTTP header or cookie, no modification is required. In case of use by parameter (Query string), the parameter must be “url encoded”.

Example of use in an iframe integrated on your web page:

    <iframe src="https://cloud.sellandsign.com/calinda/s/generic_sign_contract_index.html?l_id=id&direct_contract=1&cd_id=1&c_id=2&page=1&no_ui=true&customer_number=NC4xNDU1NTU3NjAxNTk0LjY2OTA0&j_token=%21%21%215tJ%7CS6Esy6OCRR62Jgp8df5JgUY2f2EoY3wFUmVFZVYGW%2FskM0b%2BgglYMsjhcmAP7DRFYVpmQegWd2Ugs5PoiWQoESrxBECk7Hvs%2BQ2jK0IgndaAEkmhyC99z5QUVLqiU%2B5MvfE9QuTD8Ex2H38qFfmmyPgtU4wTpMaK57CNye49ISc%3D">

It is also possible to direct the signatory directly to the signature page:


The user can continue their signature process. The following parameters of the url have to be modified:

  • l_id: the identifier of the license
  • c_id: the identifier of the contract to be signed
  • cd_id et direct_contract: the identifier of the contract model
  • customer_number: the identifier of the customer concerned by the contract to be signed

Callback on the signature

window.addEventListener("message", function(data){
	// your code here
 }, false); 

To be able to personalize the answer to give to your customer when signing, you can save a callback.

When the user has completed his signature process, the Sell&Sign page contained by the iframe will generate an event towards its parent. By listening to this event, it’s possible to get the status of the transaction, download the signed contract from our platform, and continue a business process.

To register:

When the signing process is complete, the function passed as parameter above is called.

The data (data parameter above) received when the message comes from the SELL&SIGN iframe is in the form:

var data = { 
    action: "cal_callback",
    contract_id: <Id du contrat>,
    signed: <true si le contrat est signé>, 
    customer: <structure json du client>