Results of signing

Modified on Thu, 13 Jun at 10:07 AM


How to get the results of the signing?  

There are 2 possible ways to get results from Signi:

  • 2-way integration with callback webhooks,

  • one-way integration with continuous status checking.



1. Two-way integration with callback webhook

  • The submission of the signature documents includes 3 URLs of "webhooks" for each result value:

    • signed,

    • rejected,

    • expired.

  • see e.g. the JSON introduction:


{
    "contract_name": "Dokument s webhooky",
    "number": "000001",
    "state": "pending",
    "locale": "cs",
    "settings": {
        "signing_order": "proposers_before_counterparties"
    },
    "webhooks": [
        {
            "state": "completed",
            "url": "http://example.com/?source=signi&constract_id=1234&state=completed"
        },
        {
            "state": "rejected",
            "url": "http://example.com/?source=signi&constract_id=1234&state=rejected"
        },
        {
            "state": "expired",
            "url": "http://example.com/?source=signi&constract_id=1234&state=expired"
        }        
    ],
    ....
    další části JSON
}
  • URLs typically contain calls to an integrated application. 

  • Only one of these three webhooks is ever called, depending on the result. If the url parameter is left blank, the webhook is not called.

  • In the sample call to http://apiary.io the text "your_webhook_url\" should be replaced with the real URL.

  • Now the webhook is called for each document separately, including attachments.

  • The resulting signed document is passed to the integrated application when the webhook is invoked as follows:


{
  "contract_id": 3359,
  "state": "completed",
  "file": "https://api.signi.com/api/v1/contract/pdf/preview?hash=95d02b75275851c8851b3528a4b365fd7e03fa8991ed23b25e30d16c4558",
  "attachments": []
}
  • The link to the document is only valid for 10 minutes after the webhook is invoked, later an error is returned when trying to download.  

  • Later, the document can be downloaded via  https://api.signi.com/api/v1/contract/id/download

  • The file in the webhook and endpoint download is passed in the format - Application/pdf.


2. One-way integration with continuous status verification 

  • Sometimes webhooks can be difficult to implement in an integrated system. Or it is not possible to set up access to the integrated system from the Internet for security reasons.

  • When you send a document for signature in a response, you get the document identifier in Signi Contract_id see e.g. the response "Response 200 HEADERS Content-Type:application/json BODY { "contract_id": "1234", "attachments":[]}".

  • The returned Contract_id can then be used to call the Contract Detail, Document Status, Document Download, Audit Trail/Document Check Sheet Download enpoints.

  • Endpoints are called at the appropriate time, either via some timer/cron periodically, when the form is opened, by pressing the "Update Status" button, etc.


In what format are the resulting documents transmitted?

  • The file in webhook and endpoint download is transmitted in the format - Application/pdf

PREPARE: In the End Points Full RestAPI variant, the binary files will be transcoded into text.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article